User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Find, replace, find in files, replace in files, regular expressions
5 posts Page 1 of 1
The text:

Code: Select all
: peeripaddress=
Schedtutler 2=210666666

I want to find only 210 on lines not containing also the word peer, but (?<!peer.*)210 does not work in UltraEdit. But I tested the expression in Regular Expressions test tools and there it worked. So how to make it working?
The Perl regular expression library must be able on a lookbehind to find out how much characters it has to read back from beginning of found text to test against the lookbehind expression. With .* inside the lookbehind the number of characters to read back from position where 210 is found can't be determined. This Perl regular expression is therefore invalid. Please read on Lookahead and Lookbehind Zero-Length Assertions at least the section Important Notes About Lookbehind.
Best regards from Austria

perhaps this is what you are looking for:


BR, Fleggy
Fleggy, yes it is, thanks, you are great.
The expression is unnecessarily complicated. The simpler version is:


But it works only if peer precedes 210, so if you want to find 210 on lines not containing peer at all then use this, please:


BR, Fleggy
5 posts Page 1 of 1