Group:  Microsoft Word ยป microsoft.public.word.docmanagement
Thread: Search and replace.

Geek News

Search and replace.
tivaelydoc 12/22/2008 12:28:01 AM
I need to find a way to replace about 3000 lines of code.

Every line is just set of numbers like this:

141556089
18608562
12336324

What I need the replace to do is change every number to look like this:

<a href="http://www.whateverlink.com/141556089">141556089<br />
<a href="http://www.whateverlink.com/18608562">18608562<br />
<a href="http://www.whateverlink.com/12336324">12336324<br />

How would I do it?

RE: Search and replace.
tivaelydoc 12/22/2008 12:40:01 AM
EDITED

"tivaelydoc" wrote:

[Quoted Text]
> I need to find a way to replace about 3000 lines of code.
>
> Every line is just set of numbers like this:
>
> 141556089
> 18608562
> 12336324
>
> What I need the replace to do is change every number to look like this:
>
> <a href="http://www.whateverlink.com/141556089">141556089</a><br />
> <a href="http://www.whateverlink.com/18608562">18608562</a><br />
> <a href="http://www.whateverlink.com/12336324">12336324</a><br />
>
> How would I do it?
>
Re: Search and replace.
"Herb Tyson [MVP]" <herb[ at ]1x2y3z.xnw> 12/22/2008 1:42:16 AM
Try this:

Enable Use Wildcards

Find what: <[0-9][ at ]>

Replace with: <a href="http://www.whateverlink.com/141556089">^&</a><br/>

Explanation:

<[0-9][ at ]> finds any string of numbers.


^& is a token that inserts whatever matches the search string into the
Replace string.

--
Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"tivaelydoc" <tivaelydoc[ at ]discussions.microsoft.com> wrote in message
news:61228D0C-326D-42D5-8441-858D47EABD2D[ at ]microsoft.com...
[Quoted Text]
> EDITED
>
> "tivaelydoc" wrote:
>
>> I need to find a way to replace about 3000 lines of code.
>>
>> Every line is just set of numbers like this:
>>
>> 141556089
>> 18608562
>> 12336324
>>
>> What I need the replace to do is change every number to look like this:
>>
>> <a href="http://www.whateverlink.com/141556089">141556089</a><br />
>> <a href="http://www.whateverlink.com/18608562">18608562</a><br />
>> <a href="http://www.whateverlink.com/12336324">12336324</a><br />
>>
>> How would I do it?
>>

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net