On 9/30/12 at 1:05 PM, [email protected] (kt) wrote:

Thanks Kendall I'll check out those compressors

I tried the grep, but it matched the entire contents of the file. There were only 2 lines left after it was done.
I'll try tweaking it a bit more.

One direct solution:
Find: (?s)\/\*.*\*\/\r

The (?s) lets the . match newlines.

Except that it matches from the first instance of "/*" all the way to the last instance of "*/". It would appear to work fine if there was only one /* ... */ enclosed comment in the text you're searching.

The pattern needs to use "non-greedy" matching:

Find: (?s)\/\*.*?\*\/\r

The second question mark is part of the sub-expression ".*?". This means "match zero or more of ANY character -- including newlines, because of the (?s) invocation -- until the VERY NEXT match of the next thing in the pattern", which is an escaped asterisk "\*".

HTH


   - Bruce

_bruce__van_allen__santa_cruz_ca_

--
--
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>



Reply via email to