>> I need to do a grep search/replace:
>>
>> find:
>> one string literal.. followed by any number of any chars...
>> followed by another string literal
>>
[...]
>..but why does the search pattern I mention in my orig. post fail?
The short answer :) is that (\s|\S)*? in the original pattern requires
the search to do too much work when applied against more than a small
amount of text.
The best way to match a multi-line `chunk of text` is:
(?s).+? # or ((?s).+?) if you want to preserve the matched text
where the pre-pended (?s) allows . to match line breaks, and I suggest
keeping this in the top drawer of your grep toolbox. :-)
Regards,
Patrick Woolsey
==
Bare Bones Software, Inc. <http://www.barebones.com>
P.O. Box 1048, Bedford, MA 01730-1048