On Jun 9, 2006, at 1:07 PM, Doug Knapp wrote:
My question is how find and replace something that has two consistent
markers, but a lot of variation inbetween, that covers multiple lines.
e.g.:
<head>
<varying tags>
other text not in tags
<more> stuff
<title>
I want to replace everything between <head> and <title>
Through reading the BBEdit manual, I was able to find out .*? would
act as my non-greedy wildcard except that it get caught on the line
breaks.
The pattern modifier (?s) will allow . to match \r in the rest of the
expression. (This is discussed in the "Advanced Grep Topics" in the
help.)
The following pattern should do the trick:
<head>(?s).*?<title>
Jim
--
------------------------------------------------------------------
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]>