Extract lines

Tool for Search and Replace across multiple files.

Extract lines

Postby mattrat » Thu Nov 16, 2017 2:05 am

Hi All,
I have a large number of text files I am looking through with millions of lines. I then have a small subset of part #'s (about 1000) that I am looking for and want to return the information when it is found. For example, I want to find part# xy in the 100 different text files and then whenever it is found return that line of information and save it somewhere. So I can then look at everything that was found for part xy and then all the other 999 part #'s as well.

I've gotten this far, but I just cannot figure out how to get the information in the preview to save to an output file:
Input from folders with all the text files (is doing fine at searching through them all)
Batch import list of part numbers to look up
I'm able to see what I want in the preview section, but can't export it. When I extract, it just gives me my part numbers I searched for and I dont get any of the information that I want.

Update: It looks like "export match details" does what I want, however, it only exports the list that is displayed and when the "preview all matches together" is checked it is too large to display everything. Is there anyway to export matches in the background without having to have it displayed?
Thank you,
mattrat
 
Posts: 1
Joined: Thu Nov 16, 2017 1:38 am

Re: Extract lines

Postby DigitalVolcano » Tue Nov 21, 2017 1:17 pm

Can you use a regular expression to grab the whole line and use that in conjunction with extract?


Example - Regular Expression mode, with "Multi line anchors" option checkmarked.

Code: Select all
^.*#xy.*$


This will look for "#xy" and also match the whole of the line it is on.
User avatar
DigitalVolcano
Site Admin
 
Posts: 952
Joined: Thu Jun 09, 2011 10:04 am


Who is online

Users browsing this forum: No registered users and 7 guests