[thelist] regular expressions in homesite or dreamweaver?

Sam sam at sam-i-am.com
Fri Aug 22 12:32:05 CDT 2003


> actually you should replace with \1 (not $1).  this is one of the ways
> homesite's regexps are different from "real" regexps :-)

<tip type="Extended Find/Replace in Homesite" author="Sam-I-Am">
When using regular expressions in Homesite:
 > actually you should replace with \1 (not $1).  this is one of the ways
 > homesite's regexps are different from "real" regexps :-)
(says Dave Kaufman)

You also usually need to use the literal space character e.g

(for newline) or   for space. I've not had much luck with \s in 
Homesite... but if you say it works I'll try it again.
Get your pattern to match first with an Extended Find. Then on a test 
page do the Extended Replace to check the results. Sounds obvious but a 
good habit to get into. It's the measure twice cut once rule for any 
batch replacing. (only not as catchy :)
In homesite beware that the Find Where settings are remembered from last 
use, so it's easy to mistakenly apply what was intended to be a 
document-only replacement to a whole tree of files if you're not careful
</tip>

I'll make this a tip - owed for my whining about viruses the other day.
Sam



More information about the thelist mailing list