I've been reading up on Reg Ex and just STARTING to get my head around the subject. One use I've found for it immediately is with Dreamweaver. (Dreamweaver has a "regular expression" search option). Just for my own future re-use and storage – I'll post a few I've used. (Will probably/hopefully add to this post over time…)
<td><a href=["].+["] target=["]_blank["]></a></td>
searches for
<td><a href="ANYTHING CAN GO HERE" target="_blank"></a></td>
<[/]*tr>
searches for
<tr> and </tr>
To replace only PORTIONS of what you find –
search for:
<td><a href=["](.+)["] target=["]_blank["]>
and then you can replace lit like this
<td><a href=["]$1["]>
(will "save" anything it found with (.+) and keep it in the replace with $1
Used this one today (6/5/09) – had to find spaces in a query string and replace it with %20
(pagename.php[?]m=\S[^"]*)[\s]
That will find pagename.php?m=anything except the ending quote
It stores everything except the space (should be the last one in the query string) in $1 so you can do a replace with:
$1%20
New one (8/14):
<!–.+–>
That will find all the comments on the page (again this is in dreamweaver)
Updated 7/26:
\?\>\s$$
Finds a file with space after ?> at the end of the file.