Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Search / Replace Expressions Question
I am trying to replace spaces with tabs where the format is something like
12.2121 19.2141 12.2121 19.2141 and I can't just search on 5 spaces and replace with tab because there are other occurences of multiple spaces in the document so I need to pattern match. I got this far [0-9] [0-9][0-9].[0-9] but am not sure what to put in replace. I was hoping [0-9]^t[0-9][0-9].[0-9] meaning keep what was there but use tab instead which doesn't work. Pretty sure there was a way to say ok now that you found the pattern, just replace (this) Any help appreciated. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Search / Replace Expressions Question
Never mind thanks, answered my own question, for anyone who is curious;
Separate the three parts of the search with paretheses in order to identify them; ([0-9])( )([0-9][0-9].[0-9]) then did replace as /1^t/3 meaning use the first pattern as is, then add a tab, then use the 3rd part as is. Nice stuff. "msnyc07" wrote: I am trying to replace spaces with tabs where the format is something like 12.2121 19.2141 12.2121 19.2141 and I can't just search on 5 spaces and replace with tab because there are other occurences of multiple spaces in the document so I need to pattern match. I got this far [0-9] [0-9][0-9].[0-9] but am not sure what to put in replace. I was hoping [0-9]^t[0-9][0-9].[0-9] meaning keep what was there but use tab instead which doesn't work. Pretty sure there was a way to say ok now that you found the pattern, just replace (this) Any help appreciated. |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Search / Replace Expressions Question
Never mind thanks, answered my own question, for anyone who is curious;
Separate the three parts of the search with paretheses in order to identify them; ([0-9])( )([0-9][0-9].[0-9]) then did replace as /1^t/3 meaning use the first pattern as is, then add a tab, then use the 3rd part as is. Nice stuff. "msnyc07" wrote: I am trying to replace spaces with tabs where the format is something like 12.2121 19.2141 12.2121 19.2141 and I can't just search on 5 spaces and replace with tab because there are other occurences of multiple spaces in the document so I need to pattern match. I got this far [0-9] [0-9][0-9].[0-9] but am not sure what to put in replace. I was hoping [0-9]^t[0-9][0-9].[0-9] meaning keep what was there but use tab instead which doesn't work. Pretty sure there was a way to say ok now that you found the pattern, just replace (this) Any help appreciated. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2003: Search and Replace Question... | Microsoft Word Help | |||
Question about search and replace | New Users | |||
Need help with Find and Replace using Regular Expressions | New Users | |||
Search and replace question | New Users | |||
A search and replace question | Page Layout |