Page 1 of 1

nooB question

Posted: Mon Feb 26, 2007 2:54 am
by fr0gman
I am new to this program and I need to extract URLs from the following lines:

ABC 01_02 (brown dog)|http://www.mydomain.com/dir1|description text number one
ABC 02_02 (black dog)|http://www.mydomain.com/dir2|description text number two

When complete I need a file with the following:


http://www.mydomain.com/dir1
http://www.mydomain.com/dir2

Thanks in advance.

Posted: Mon Feb 26, 2007 8:49 am
by Abacre
Could you give us more details?
So each line of the file has the following format:
ABC 01_02 (some text)|http://www.mydomain.com/dir1|some description

and there are no other types of lines?

Posted: Mon Feb 26, 2007 4:02 pm
by fr0gman
there are a few lines that are like group headings but not so many that I can't manually delete....

so it would be something like:

List of pets:

ABC 01_02 (brown dog)|http://www.mydomain.com/dir1|description text number one
ABC 02_02 (black dog)|http://www.mydomain.com/dir2|description text number two

List of plants:

ABC 03_01 (green tree)|http://www.mydomain2.com/dir1|description text number one
ABC 03_02 (yellow flower)|http://www.mydomain2.com/dir2|description text number two

Posted: Mon Feb 26, 2007 11:36 pm
by Abacre
I suppose that these strings occupy the whole lines inside the file.

Go to main menu - Action - Options - Batch Replace
uncheck "Modifier S"
uncheck "Modifier G"

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
ABC \d\d_\d\d \(.*\)\|(http.*)\|.*\r\n

Replace with:
$1\r\n

That's all I verified it works perfectly.

Note that this batch pair will replace inside the file. So you have to
work with copy of your files instead of working with original file.