Regular expressions to remember

From Code Trash

Jump to: navigation, search
<script[^>]*?>[\s\S]*?<\/script>
match all script tags including the contents

matching all title tags
<title>.*?</title>

matching only the contents inside a title tags
(?<=<title>).*?(?=</title>)

<img(.+)">
find all unclosed xhtml image tag
Personal tools
Google AdSense