Looking for help with a task for AFR

General discussions about Advanced Find and Replace
Post Reply
nitron
Posts: 1
Joined: Fri Jun 23, 2006 1:44 pm
Location: UK

Looking for help with a task for AFR

Post by nitron » Fri Jun 23, 2006 2:41 pm

I do not know if this is possible or not. I am looking to take text files of article titles and turn the list into hyperlinked titles with line breaks. Let me show you an example and explain this more clearly -

I would like to turn a title list like this -

The pampered pet Tell tail signs that your dog is spoiled

Hunting Dogs Training equipment that is essential

Fur Tamers How to keep your dogs coat looking its best



and have it come out like this -


<a href="The-pampered-pet-Tell-tail-signs-that-your-dog-is-spoiled.html">The pampered pet Tell tail signs that your dog is spoiled</a><br>

<a href="Hunting-Dogs-Training-equipment-that-is-essential.html">Hunting Dogs Training equipment that is essential</a><br>

<a href="Fur-Tamers-How-to-keep-your-dogs-coat-looking-its-best.html">Fur Tamers How to keep your dogs coat looking its best</a><br>


As you can see each line still contains the original title, but each one is preceeded with <a href=" and then the title with - between each word and then "> then there is the actual title itself followed by </a><br>

This would be the same for every title in each list.

I am hoping that someone may have the answer to this to save me a huge amount of time doing this manually with very long lists.

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

Post by Abacre » Wed Jun 28, 2006 6:33 pm

Yes, it's possible to do with Advanced Find and Replace.

Go to main menu - Action - Options - Batch Replace
uncheck "Modifier S"
check "Modifier M"
check "Modifier I"
check "Modifier E"
uncheck "Modifier X"

Go to Batch replace tab, check on "Use regular expressions".
Put into the grid, search for:
^(\S.*)\r\n

Replace with:
<a href="<%=Replace("$1"," ","-")=%>.html">$1</a><br>\r\n

That's all I verified it works perfectly.
The software produces exactly the same results as you described above.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests