I'm trying to insert some new HTML into several HTML pages. The new HTML should appear between the first and second HTML-formatted paragraphs but not between any other subsequent paragraphs.
I used grep to find the first paragraph's closing p tag, the two returns between the paragraphs and the opening p tag of the second paragraph. I then replace the found tags and returns with the new HTML using multi-file search.
All this works fine EXCEPT that it replaces every instance of the opening and closing p tags in each document.
I only want to change the first instance but each HTML page is different enough to make it a more difficult "automated" grep task than I originally thought.
I found an old post via Google that had several answers about finding/ replacing only the first tab in a document and ignoring subsequent tabs in a multi-search and replace but it doesn't seem to work with my HTML
I'd include some code but not sure how to format it for posting.
Thanks.
-- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a feature request or would like to report a problem, please email "support@barebones.com" rather than posting to the group.
Jun 17
Roland Küffner Re: GREP - Find First Instance Only
Jun 17, 2010; 00:17
Roland Küffner
Re: GREP - Find First Instance Only
Jun 20
mindmojo Re: GREP - Find First Instance Only
Jun 20, 2010; 07:07
mindmojo
Re: GREP - Find First Instance Only
Jun 18
mindmojo Re: GREP - Find First Instance Only
Jun 18, 2010; 11:19
mindmojo
Re: GREP - Find First Instance Only
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!