> If I understand this right, you are looking for extra hyphens in the opening > and closing tags (I don't think these extra hyphens are illegitimate > specificationwise but I'm not quite sure about that). Anyway, you could > capture these by extending the pattern like this:
Hi Roland, I am not sure either, but one article I read recently made me guess that double hyphens will always be a problem.. even if immediately concatenated onto the opening or closing comment tags. It would be easy for me to check, but anyway, for now moving on (below)... > search > (?s)<!-{2,}([^-]*?)-+([^-]*?)-{2,}> > > replace with > <!--\1\2--> this works really great, and covers the bulk of the badly formed comments i have in the files I am working with now. Thank you for the tweak! > Comments nested completely in other comments (as seen in one of your > examples) are a totally different beast. Please be aware that nested comments > will break the above search pattern as it would break the second comment > opening in something like > <!-- bla <!-- nested blabla --> more bla --> well I get the idea that it is too much to try and do everything with one grep in my case.. because the ways the comments were written are bad in more than a few (tricky) ways. Thank you for your time. Let us here work with what you two have already offered, rather than you spend more time here. Your help is much appreciated. -Govinda -- 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. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>