Hi, Am 28.10.2010 um 28, 21:18 schrieb Govinda: > > (?s)(<!--[^-]*?)-+([^-]*?-->) > works great except that comments where the number of extra hyphens, > like so: > "<!--- some notes here --->", or > "<!---- some notes here ---->" > are not found.
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: search (?s)<!-{2,}([^-]*?)-+([^-]*?)-{2,}> replace with <!--\1\2--> 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 --> Maybe I'll think a little more on the nested problem. But right now I don't have enough time on my hand. 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. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>