Welcome to the Mythicsoft Q&A site for:

- Agent Ransack
- FileLocator Lite
- FileLocator Pro

Please feel free to ask any questions on these products or even answer other community member questions.

Useful Links:

- Contact Us
- Help Manuals
- Mythicsoft Home
0 votes

I want to find a pattern (e.g. URLs or email addresses) in a group of files and then export that information as a list in a text file. Can I do that with FileLocator Pro?

asked by (1.6k points)

1 Answer

0 votes

Yes you can. Basically you search for the the pattern using regular expressions and then use the Keyword Summary report to display the unique hits.

Step-by-step instructions

  • Use the following regular expression (taken from RegExLib.com) to search for URLs in your files (email and credit card regular expression patterns included at end of answer) :
`(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?`

alt text

  • Click on the Reports tab and change the Report to be the Keyword Summary report to view the unique URLs:

Keyword Summary

  • You can then use the standard reporting functionality to either copy, print, or save the URLs.

Note: By default the Keyword Summary report will display other columns. To switch off those columns just click on the Report Options button and choose only the Keyword Hit column:

alt text


Exporting list of email addresses

You can use the same method to export a list of unique emails from a group of files. Simply change the regular expression used above to something like this:

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b

Exporting list of credit card numbers

For credit card numbers change the regular expression used above to something like this:

\b(\d[ -]*?){15,16}\b

Older Versions: The Reporting tab was added in FileLocator Pro version 7 but you can achieve similar results with earlier versions of the program using the Exporting feature and the custom format unique_hits_only.xsl, stored in the Sample Transforms folder. After the initial search follow these steps:

  • Choose File->Export Results... to export the results

  • Select the 'Custom (XSLT)' format option

  • Browse to the Sample Transforms folder and pick the file: unique_hits_only.xsl

Export Unique Hits

  • Click the Export button
answered by (62k points)
...