In Notepad++, you might have a requirement to find or replace lines which do NOT match a particular string.
Lets say you have the following lines in your text file - and you would like to the find lines NOT containing the string "USA"
Apple - USA
Airbus - France
Google -USA
IBM - USA
SAP - Germany
TESCO - UK
For this, you will have to use the Notepad++ Regex find option
Here's how:
Here's a screenshot of my notepad++ screen.
Lets say you have the following lines in your text file - and you would like to the find lines NOT containing the string "USA"
Apple - USA
Airbus - France
Google -USA
IBM - USA
SAP - Germany
TESCO - UK
For this, you will have to use the Notepad++ Regex find option
Here's how:
- Press Ctrl + F to pop open the Find dialog box
- Select the Regular Expression radio button
- Type in the find box :
^(?!.*USA).*$
- Now find or replace.
- Mastering Regular Expressions - by Jeffrey Friedl ( Amazon.com | Amazon.in )
- Regular Expressions Cookbook by Jan Goyvaerts, Steve Levithan ( Amazon.com | Amazon.in)
Here's a screenshot of my notepad++ screen.
3 comments:
How did you get that extra view at the bottom showing the results of the search?
I don’t use notepad but I’m sure you helped all those who were facing this problem. Thank you for posting clear, step by step instructions.
Casino, Racetrack and Poker - Mapyro
Casino, Racetrack and 파주 출장안마 Poker is 안성 출장마사지 the only place in New 경산 출장마사지 Jersey to find the best games, 서귀포 출장마사지 tournaments, and dining options. Visit our website 거제 출장샵 for information and
Post a Comment