Rearranging text

General discussions about Advanced Find and Replace
Post Reply
tutone
Posts: 12
Joined: Thu Feb 23, 2006 9:34 pm

Rearranging text

Post by tutone » Sat Feb 25, 2006 4:36 am

Roman -

Thanks for you previous help... worked perfectly.

Now another problem...


i have a ton (thousands) of links that look something like this

/site/dc/20.html#53
/site/ot/18.html#44
/site/nt/1.html#2

i need to look like this

/site/dc.html#20: 53
/site/ot.html#18: 44
/site/nt.html#1: 2


thanks in advance for you help. You and your program are amazing.

the "/site/" is always the same but the rest vary

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

Post by Abacre » Sat Feb 25, 2006 10:36 am

Use:

Search for:
/site/(\w+)/(\d+)\.html#(\d+)

Replace with:
/site/$1.html#$2: $3
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

tutone
Posts: 12
Joined: Thu Feb 23, 2006 9:34 pm

Post by tutone » Sat Feb 25, 2006 9:15 pm

worked perfectly. You are extremely smart and very nice.

What about this problem...

I have this link in about 2000 different files and in each file the exact link is repeated about 30 times.

I need to place an <H1> tag for the first instance of the link in that file and then <H2> for the second and so on... starting over with each new file.

The link

<a href="StandardWorks.html">The Standard Works</a></small>

the result

<h1><a href="StandardWorks.html">The Standard Works</a></small></h1>

<h2><a href="StandardWorks.html">The Standard Works</a></small></h2>
<h3><a href="StandardWorks.html">The Standard Works</a></small></h3>

... and so on it that file....

and then repeating again in the next file

<h1><a href="StandardWorks.html">The Standard Works</a></small></h1>
<h2><a href="StandardWorks.html">The Standard Works</a></small></h2>
<h3><a href="StandardWorks.html">The Standard Works</a></small></h3>

... and so.

Is this possible.

thanks

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests