In a directory with hundreds of xml-files, I need to find the files which contain the string nature where this string is not preceded by a semicolon on the same line.
For example:
It should find:
STATUS_OMS.PLUVOI = "NATURE"
It should NOT find:
; Horse Nature Product..
I'm rather new to regular expressions. I tried a lot, this once seems to come close, but the negation does not have the desired effect.
[^;].+?nature
Any pointers to what I'm doing wrong?
Please note that I'm using notepad++
You're looking for:
^[^;]*nature
which looks for a line starting with any number of non-semicolon characters followed by "nature".
Your regex:
[^;].+?nature
looks for exactly one non-semicolon character anywhere in a line, followed by one or more characters of any kind, followed by "nature".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With