regex - Is it possible to match a pattern using a regular expression across a newline in UltraEdit? -


Includes a Perl and Unix compatible regular expression engine for searching in UltraEdit text editor.

I want to be able to match a string line:

  & lt; Branch id = "specialty" & gt; & Lt; Leaf ID = "Attribute" /> & Lt; Leaf ID = "Attribute" /> & Lt; Leaf ID = "Attribute" /> & Lt; / Branch & gt;  

With something like this:

  /  

Is this a way to use ultrade?

If you have a Perl selected regular expression, you can do something like this:

< Pre> & lt; Branch id = "specialty" & gt; [\ S \ S] * & lt; / Branch & gt;

Where \ s is the character of any white space, which contains Newline and returns and \ S is any other character Note that this is greedy by default, so if you have the following The string is:

  & lt; Branch id = "specialty" & gt; & Lt; Leaf ID = "Attribute" /> & Lt; Leaf ID = "Attribute" /> & Lt; Leaf ID = "Attribute" /> & Lt; / Branch & gt; & Lt; Branch id = "specialty" & gt; & Lt; Leaf ID = "Attribute" /> & Lt; Leaf ID = "Attribute" /> & Lt; Leaf ID = "Attribute" /> & Lt; / Branch & gt;  

Then a regular expression will get the entire string in the form of a match. If you do not want to do this, as follows? Add:

  & lt; Branch id = "specialty" & gt; [\ S \ S] *? & Lt; / Branch & gt;  

As you can see from the answers, Ultradet has many ways to accomplish this!

Note: AltraEdit was tested with 14.20.


Comments