Page 1 of 1

Looking for help with a task for AFR

Posted: Fri Jun 23, 2006 2:41 pm
by nitron
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.

Posted: Wed Jun 28, 2006 6:33 pm
by Abacre
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:

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.