Page 1 of 1

Extracting certain strings from text files

Posted: Sun May 24, 2009 5:42 pm
by John Land
Hello!

Let's say I have 500 text files and I want to extract only the strings of the form:

"http://site.com?d=*****" where instead of *, there is a number.

How can I achieve this? I want only a list with such a structure and no other characters or code.

Posted: Tue May 26, 2009 10:27 am
by DV
Try this

Click on the 'Use Regular Expressions' box
Enter the following reg ex:
http:\/\/site.com\?d=[0-9]?[0-9]?[0-9]?[0-9]?[0-9]?

Click 'Extract'.

This should work for numbers up to five digits (you can add more by modifying the expression).