How can i search multiple words in a file on Notepad++

386 Views Asked by At

I'm trying to find a list of Strings in a file (already formated from \n and \r), for example :

0145100841
65722ED01A
657738J000
6584640F00 // this one is found

in a file of this :

201506186584640F00AME NMGR01 RUBAT

How can i do this in Notepad++ ? Is there an existing plugin ?

1

There are 1 best solutions below

0
On BEST ANSWER

Prolog

To help people coming from the search or Google, I write it again as answer. Please mark it as correct answer to improve the speed of finding the correct answer.

You can also check the comment section inside the question if something is unclear.

Solution

Instead of seperating the search terms by \r a possible solution would be seperating them by | Pipe symbol, so you can use the whole string as an Regular Expression.

Search Term: 0145100841|65722ED01A|657738J000|6584640F00

You can now press CTRL + F (or in Germany STRG + F) to open the "Search"-Window. Now you have to change the "Search Mode" to "Regular Expression" and insert the search term. If you now press search you will get one match (if one exists) and with every continued press, you will get another match (if one exists).

You can test this with following random text content.

Following the Pastebin: http://pastebin.com/YB3i1Ju0

To remove the dependency on pastebin, here the random text content pasted as blockquote:

RANDOM TEXT CONTENT

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat6584640F00, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.Lorem657738J000 ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, n65722ED01Ao sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetet0145100841ur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.