Reputation: 31
I want to search for strings in notepad++ which has strings "XYZ" and "ERROR" in the same line.
I've tried to search with XYZ.*ERROR but the issue is that it returns the lines with only ERROR,only XYZ, and both XYZ and ERROR.
Eg: My records look somewhat like this:
The application XYZ has a ERROR
XYZ is a good application
The application WXYZ has a ERROR
ERROR in server
Now when I search, I want only line 1 to be returned in the search result. However, I am getting every line in the search which defeats the purpose.
Upvotes: 0
Views: 2197
Reputation: 91385
Insert word boundaries around your keywords:
\bXYZ\b.*\bERROR\b
Screenshot:
Upvotes: 2