Reputation: 13825
I can easily find '\n' in notepad++, but my problem here is that I have to find '\n' when not followed by a specific character ("#" in this case). So do I use Regex with '\n'? Is it possible?
Example :
Stuff to ignore
#Like that
Stuff
To change
Upvotes: 3
Views: 1367
Reputation: 2970
You can find some specifics in this question, but first make sure your line-endings are purely \n
.
Mac OS line-endings are \r
(OSX is \n
), Windows/DOS are \r\n
,and UNIX-style are \n
, mostly.
The regex you are looking for is probably .*\n[^#].*
, specifying [^...]
(not set)
But you could try using the EOL regex character, $
, instead:
.*$[^#].*
Or, as xdazz said, just try \n(?!#)
Upvotes: 2