Free text editor that can search for multiple words

Associate
Joined
1 Sep 2005
Posts
410
Hi,

I'm looking for a free text editor that can search for a list of key words in a tab delimited text file, can anyone recommend one? Failing that could it be done via the use of macros in Excel?

Thanks in advance
-Howard Webb
 
Hi,

Thanks for the response. As an example: say I had a tab delimited text file containing the following


dog,cat,horse,cow,bird,worm

I would like to search using a list like below:

dog,cow

and for it to return the hits.

The reason for this is I would like to search for a list of reserved words in huge tab delimited files. As the list is long pasting them in one at a time is not an option.

Thanks
-Howard Webb
 
Regular Expressions might help you. I would recommend notepad++ but it doesn't support this regular expression so try gvim:

hDLHt.png


Just type:
:/horse\|cow\|dog\|pony\|duck (adding each new search string with \|word)

and press enter. You should see what you're typing at the bottom of the window (like in the screnshot), you might need to press escape first to be able to do it.

More vim expressions for you:
http://www.rayninfo.co.uk/vimtips.html
 
findstr /i "dog cow" "input file.txt">outputfile.txt

/i is to ignore case.

edit:

though if your list of search words is v.long you can put them in a text file, one on each line, and do...

findstr /i /g:words.txt "input file.txt">outputfile.txt
 
Last edited:
Back
Top Bottom