[thelist] homesite regexp help? (became tip)

Sam-I-Am sam at sam-i-am.com
Mon Sep 18 15:08:41 CDT 2000


<tip type="regular expressions in Homesite" author="sam at sam-i-am.com">

(this was going to be a question, but then I (think) I fixed it. )
I was using a simple re (in Homesite) to remove dreamweaver comments:

<!-- #Begin|End[^>]+-->

But found it was matching my own comments like:
<!-- END content module: left padding, left col, divider, padding,
content, right margin -->

or more precisely the match was:
END content module: left padding, left col, divider, padding, content,
right margin -->

Using the | (or) was effectively saying match "<!-- #Begin" or "End" ..
not at all what I wanted. 

Fixed, it looks like: <!-- #(Begin|End)[^>]+-->
I have this as a saved search in my extended search/replace box, for
rapid removal of all your dreamweaver template / library placeholder
comments, when it comes publishing/delivery time. 

</tip>




More information about the thelist mailing list