nooB question

General discussions about Advanced Find and Replace
Post Reply
fr0gman
Posts: 7
Joined: Sun Aug 27, 2006 6:26 am
Contact:

nooB question

Post by fr0gman » Mon Feb 26, 2007 2:54 am

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.

Abacre
Site Admin
Posts: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Feb 26, 2007 8:49 am

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?
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

fr0gman
Posts: 7
Joined: Sun Aug 27, 2006 6:26 am
Contact:

Post by fr0gman » Mon Feb 26, 2007 4:02 pm

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

Abacre
Site Admin
Posts: 1201
Joined: Mon Jan 31, 2005 5:32 pm
Contact:

Post by Abacre » Mon Feb 26, 2007 11:36 pm

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.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests