On 18-Sep-2008, at 14:47, DM666 wrote:
> <filter>
> <start>-1</start>
> <end>-1</end>
> <effect>
> <name>Shift Fields</name>
> <effectid>Shift Fields</effectid>

  ...

> I would like to match any occurrence of this chunk of text, i.e.,
> everything between "<filter>" and "</filter>" tags, with a match on
> the string "<name>Shift Fields</name>" (without the quotes). As you
> can see, there are line breaks, tabs, and various chunks of text
> before and after the string within the matching filter tags.


You can brute force it, since you are getting a stack error with  
Ronald's suggestion:

<filter>\s+<start>[^<]+</start>\s+<end>[^<]+</end>\s+<effect>\s 
+<name>Shift Fields</name>\s+<effectid>[^<]+</effectid>

etc etc.

\s matches all whitespace, including carriage returns and [^<]+  
matches any non < character, so I use it all the time to find the  
between tag data in XML and HTML files:

<title>([^<]+)</title> will get the title text of the document and put  
it into \1

NB: I had some weirdness trying to test that find/replace with the non- 
modal find dialog.  Something would work, then fail if I pasted the  
regex in, then it would work again.  Dunno why yet, but the modal find  
seemed to work. It's probably something I'm doing, but if you have  
issue, switch back the non-modal and see how it works.



-- 
"Katrina, $4 gas, a trillion dollar war, rising unemployment,
      deregulated housing market, global warming...NO MORE!"
      http://is.gd/2mxY




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to bbedit@googlegroups.com
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 specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to "[EMAIL PROTECTED]" 
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to