Am 31.03.2010 um 02:32 schrieb farley2: > Hoping someone here can help solve an issue I have been struggling > with. The code looks similar to that below. However all pages (over > 600) are not as clean as this, meaning DIVs could be on the same line > or there could be 1 or 2 line breaks separating them. > > > < !-- InstanceBeginEditable name="content-right" -- > > < div id="container" > > < div class="column1" > > Content for column 1 > < /div > > > < div class="column2" > > Content for column 2 > < /div > > < /div > > < !-- InstanceEndEditable -- > > > The goal is to find the < div id="container" > and delete this > container along with the div inside without effecting the content > within each div.
If I understand this right you basically want to remove all divs inside the comment. You could search: (?s)< !-- InstanceBeginEditable name="content-right" -- >(.*?)(< div.+?>|< /div>)(.*?)< !-- InstanceEndEditable -- > and replace with: < !-- InstanceBeginEditable name="content-right" -- >\1\3< !-- InstanceEndEditable -- > This will remove a single div tag a time meaning you have to perform this search over and over until it returns zero matches. Not very elegant but it should work. (I'm sure you aware of this but just for the record: I would have backups before unleashing this crude procedure on 600+ files) Regards Roland -- 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+unsubscr...@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 "supp...@barebones.com" rather than posting to the group. To unsubscribe, reply using "remove me" as the subject.