Page 1 of 1

Display only the search-hit records

Posted: Sat Sep 12, 2015 9:59 am
by djbeam
If you have a CSV or Text file .. is there way to display only those records within the file (assuming a LFCR or CR delimiter) that meet a search criteria and display them in the sequence found or using the sort capabilities within V.

Re: Display only the search-hit records

Posted: Sat Sep 12, 2015 6:57 pm
by FileViewer
is there way to display only those records within the file (assuming a LFCR or CR delimiter) that meet a search criteria and display them in the sequence found

No, you can't do this, but there is a workaround.

You can create a new file which contains just the records that match your search criteria.

To do this:

  • Select Find Files/GREP from the toolbar while you are viewing the CSV file (or press Ctrl+Shift+F) and select the Text Search tab
  • Enter your search criteria and then enable Limit To and select Current File from the list
  • Then press Search
  • After the search has finished, right click on the search results and select Copy Search Results->Copy ALL Results to a File
The new file will the contain all the records that match your search criteria.

Note that before doing the search you should select the Options tab of GREP and disable File Path and Line Number from Include in Copied Text. If you don't disable these, each line in the file will contain the file name and line number and the file will no longer be a valid CSV file.