The take-home message from Google Kreme is that (in my experience) you
have to tailor every RegExp solution to the case at hand.
Bruce, thanks for showing us a solution with the embeded modifier. I
didn't know that trick already.
The original question didn't say anything about nested divs; of course
you'd have to change the solution to match.
Dean, if there are a variable number of nested divs, then you're
simply going to have to mark the end of your pattern better than you
have: you can't recognize the end of the pattern as "</div>" because
there are multiple divs. So hopefully there's some consistent code
that always follows the footer div. One might expect that some other
divs get closed, as well as the body and the html elements.
<html><head></head><body>
<div id="everything"
...
<div id="footer">
old stuff
</div>
</div>
</body>
</html>
So replace
<div id="footer">
old stuff
</div>
</div>
</body>
with
<div id="footer">
new stuff
</div>
</div>
</body>
... I'd run into this sort of issue all the time when modifying
tables. Everything's a TD, so you have to craft your regular
expressions to recognize more text than just "<td>...</td>"
hope you find that helpful and creative, Dean
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>