On 9-Jul-2007, at 22:09, Bruce Van Allen wrote:
On 7/9/07 Google Kreme wrote:

On 8-Jul-2007, at 13:07, Bruce Van Allen wrote:
Find:
(<div id="footer">)(?s).+?(</div>)

Replace:
\01*newStuff*\02

Thsi will fail in this case

<div id="footer">
   <div id="footer_inc">
      [Stuff 1]
   </div>
      [Stuff 2]
</div>

Only everything through Stuff 1's closing div will be replaced.

Yes. My post answered a specific question about how to generalize the
sub-expression (.+?|\r). I used the exact example posed by the
questioner. This question was raised before someone asked about nested
<div> elements. Too bad you didn't get the thread in sequence.

BTW, what's your contribution to the nested <div> question?

A simple warning that doing this over a set of files might have serious, and unintended, consequences?

You'd have to get someone better with grep to see if it's possible. It might be possible with a look-ahead, but that tends to make the individual brain cells in my head itch.

I would probably look into an applescript that did a balance current tag and then searched over the found area.

Well, to be honest, what I would do is replace the whole footer block with a <?php include('footer.html.inc'); ?> if it was something that was going to change frequently.

Then I get to edit one file one time and everything gets updated.

--
The person on the other side was a young woman. Very obviously a young woman. There was no possible way that she could have been mistaken for a young man in any language, especially Braille.


--
------------------------------------------------------------------
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]>

Reply via email to