Thanks!

On Monday, August 13, 2018 at 7:01:21 PM UTC+2, Patrick Woolsey wrote:
>
> On 8/13/18 at 11:27 AM, jerry....@gmail.com <javascript:> (Jerry Nilson) 
> wrote: 
>
> >Cannot figure out (new to this) how to write a grep search to match: 
> ><description><![CDATA[data1: 2820<br>data2 (m): <br>data3: word 
> >word<br>data4: XX-7-3056<br>data5:<br>data1: 2820<br>data2 (m): 
> ><br>data3: word word<br>data4: XX-7-3056<br>data5: ]]></description> 
> > 
> >Where I want to substitute all similar lines with: 
> ><description></description> 
> > 
> >Thought I could write: 
> ><description>.*</description> 
> >or possibly with a ? after, but seems I may need more escape 
> >characters here because some of the characters to be deleted 
> >are also grep characters? Tried witch escapes too, but cannot 
> >get it quite right apparently ... . 
>
>
> One potential catch here is that by default the . metacharacter 
> doesn't match past hard line breaks, so if the desired data 
> spans one or more lines, a pattern like this: 
>
> Find:    <description>.*</description> 
>
> won't work. 
>
> You can however modify this behavior by pre-pending the pattern 
> modifier (?s), and then for insurance adding a ? to prevent the 
> match from being 'greedy', making a search pattern: 
>
> Find:    <description>(?s).*?</description> 
>
> so please give that a try. :-) 
>
>
> Regards, 
>
>
>
>    Patrick Woolsey 
>
> == 
>
> Bare Bones Software, Inc.             <http://www.barebones.com/> 
>
>
>

-- 
This is the BBEdit Talk public discussion group. 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>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to