View Single Post
  #2   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Need some Search & Replace help

In the Replace dialog, first click the More button and check the box for
"Use wildcards".

Copy the next line and paste it in the Find What box:

([0-9]{2})([0-9]{2})([0-9]{2})

Copy/paste the next line in the Replace With box:

\1^t\2^t\3

Click the Replace All button, and you're done.

Explanation: First, read http://www.gmayor.com/replace_using_wildcards.htm.
Then you'll be able to see that the Find What expression means "look for
text that consists of three consecutive groups of two digits each", and the
Replace With expression means "replace with the same three groups separated
by tab characters".

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

scotteh wrote:
HI all. I need to do an unusual search and replace and need some help.
Hopefully this is fairly basic for most people.

I have strings of numbers, cd-track-index all grouped together and I
want to seperate them with tabs. So the list looks like this:

231001
241002
253401
271501

They need to end up like this:

23 10 01
24 10 02
25 34 01
27 15 01

except with tabs instead of spaces. So I need to search for any 2
digits, then replace them with the SAME 2 digits + a tab character.

Any ideas?

Thanks!!

Scott