If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Need some Search & Replace help
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 |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
Need some Search & Replace help
A wildcard search for
([0-9]{2})([0-9]{2})([0-9]{2}) replace with \1^t\2^t\3 should do the trick See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org 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 |
#4
|
|||
|
|||
Need some Search & Replace help
Dead heat!
-- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Graham Mayor" wrote in message ... A wildcard search for ([0-9]{2})([0-9]{2})([0-9]{2}) replace with \1^t\2^t\3 should do the trick See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org 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 |
#5
|
|||
|
|||
Need some Search & Replace help
Doug
Strictly speaking, Jay hit the send button 48 seconds before Graham. vbg Terry "Doug Robbins - Word MVP" wrote in message ... Dead heat! -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Graham Mayor" wrote in message ... A wildcard search for ([0-9]{2})([0-9]{2})([0-9]{2}) replace with \1^t\2^t\3 should do the trick See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org 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 |
#6
|
|||
|
|||
Need some Search & Replace help
Thanks guys! However... didnt work. I understand what that SHOULD do,
so I pasted it in (didnt even type it, PASTED! so I wouldnt make any mistakes, tried both even though they seem identical) and hit Find Next and it said "the search item was not found". Nothing in the document was highlighted. It just cant find a match! I even tried just ([0-9]{2}) to see if it would find the first 2 and no go. Then I put spaces between the first sets. Nothing. Then I added just the number 23 on a blank line and put the cursor on a line before it. Still found nothing! This is Word 2000 SR1 btw. These are the exact first few lines: MIX 219902 MIX 222202 MIX 219803 MIX 219802 MIX 219903 MIX 212302 MIX 241103 MIX 255301 I've already put a tab between MIX and the numbers. Any other ideas? Scott Jay Freedman wrote: 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. |
#7
|
|||
|
|||
Need some Search & Replace help
Ahhh crap! Nevermind. I found it. I clicked More and found that "Use Wildcards" was turned off. All fixed! Thanks again guys!! Excellent work!! Scott scotteh wrote: Thanks guys! However... didnt work. I understand what that SHOULD do, so I pasted it in (didnt even type it, PASTED! so I wouldnt make any mistakes, tried both even though they seem identical) and hit Find Next and it said "the search item was not found". |
#8
|
|||
|
|||
Need some Search & Replace help
It was morning in the US and late afternoon in Cyprus. I was just a little
better rested. g Jay Terry Farrell wrote: Doug Strictly speaking, Jay hit the send button 48 seconds before Graham. vbg Terry "Doug Robbins - Word MVP" wrote in message ... Dead heat! -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Graham Mayor" wrote in message ... A wildcard search for ([0-9]{2})([0-9]{2})([0-9]{2}) replace with \1^t\2^t\3 should do the trick See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org 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 |
#9
|
|||
|
|||
Need some Search & Replace help
That probably explains it then.
Terry "Jay Freedman" wrote in message ... It was morning in the US and late afternoon in Cyprus. I was just a little better rested. g Jay Terry Farrell wrote: Doug Strictly speaking, Jay hit the send button 48 seconds before Graham. vbg Terry "Doug Robbins - Word MVP" wrote in message ... Dead heat! -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Graham Mayor" wrote in message ... A wildcard search for ([0-9]{2})([0-9]{2})([0-9]{2}) replace with \1^t\2^t\3 should do the trick See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org 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 |
#10
|
|||
|
|||
Need some Search & Replace help
Because of the time Outlook Express takes to update the current group, I had
no way of knowing he had posted - however the rest bit is probably true - I had been moving a lime tree to a new location and was knackered -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Terry Farrell wrote: That probably explains it then. Terry "Jay Freedman" wrote in message ... It was morning in the US and late afternoon in Cyprus. I was just a little better rested. g Jay Terry Farrell wrote: Doug Strictly speaking, Jay hit the send button 48 seconds before Graham. vbg Terry "Doug Robbins - Word MVP" wrote in message ... Dead heat! -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Graham Mayor" wrote in message ... A wildcard search for ([0-9]{2})([0-9]{2})([0-9]{2}) replace with \1^t\2^t\3 should do the trick See http://www.gmayor.com/replace_using_wildcards.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org 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 |
|
Thread Tools | |
Display Modes | |
|
|