Hi guys
thanks so much for your replies; I appreciate that you offered me some
more depth of grep.
I'll have to really play with it before responding fully.. but I did
notice this so far:
(?s)(<!--(?>(?:(?!--).)*))--(?!>)((?>(?:(?!--).)*)-->)
seems to work good, but there are (unfortunately) all kinds of wonky
code blocks in the files I am aiming to clean.. including some
comments like:
"<!-- hello world --->", and
"<!--
<!-- stuff -->
hello world
-->", and
"<!--- stuff --->"
(maybe ^^ this last type is OK? I forget just now.)
(?s)(<!--(?>(?:(?!--).)*))--(?!>)(.*?-->)
spans across multiple comments if they are like so (which many are):
"<!--- some notes here --->
more stuff
<!--- begin : some notes here --->"
(?s)(<!--[^-]*?)-+([^-]*?-->)
works great except that comments where the number of extra hyphens,
like so:
"<!--- some notes here --->", or
"<!---- some notes here ---->"
are not found.
I am hardly complaining with your guys' offerings.. ;-) You are
teaching me, and the bad HTML is not your fault, and is what it is
(certainly not anything real interesting to you who are trying to
help).. I am just saying what I am finding (as I try the greps across
many dozen sloppy/legacy files), in case you get any more
inspiration. I am quite behind you in (learning) grep.
thanks
-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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>