Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Wildcards should let me replace text - ***p = 430p, rep w/*** p
I am searching a text document in Word in order to edit out items that will
not import correctly into an Excel Worksheet. The time format in the text document reads, for example. "430p". I would like to find all times in this format by seaching with a wildcard in the format "***p" and replacing with the found characters with a modification as "*** p". The result of the above example would be "430 p". ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/office/comm...ocmanagemen t |
#2
|
|||
|
|||
stuart s wrote:
I am searching a text document in Word in order to edit out items that will not import correctly into an Excel Worksheet. The time format in the text document reads, for example. "430p". I would like to find all times in this format by seaching with a wildcard in the format "***p" and replacing with the found characters with a modification as "*** p". The result of the above example would be "430 p". See http://www.gmayor.com/replace_using_wildcards.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#3
|
|||
|
|||
Jay,
I have read your post with great interest and I find it enlightning, however, I cannot relate any of your examples to my problem. I am having no problem finding text using wildcards, but replacing the found text with what was found + modifications is my problem. "Jay Freedman" wrote: stuart s wrote: I am searching a text document in Word in order to edit out items that will not import correctly into an Excel Worksheet. The time format in the text document reads, for example. "430p". I would like to find all times in this format by seaching with a wildcard in the format "***p" and replacing with the found characters with a modification as "*** p". The result of the above example would be "430 p". See http://www.gmayor.com/replace_using_wildcards.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#4
|
|||
|
|||
You have to divide your "Find what" text into two parts. You then replace
with \1 \2 (that is, the first part, followed by a space, followed by the second part). -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "stuart s" wrote in message ... Jay, I have read your post with great interest and I find it enlightning, however, I cannot relate any of your examples to my problem. I am having no problem finding text using wildcards, but replacing the found text with what was found + modifications is my problem. "Jay Freedman" wrote: stuart s wrote: I am searching a text document in Word in order to edit out items that will not import correctly into an Excel Worksheet. The time format in the text document reads, for example. "430p". I would like to find all times in this format by seaching with a wildcard in the format "***p" and replacing with the found characters with a modification as "*** p". The result of the above example would be "430 p". See http://www.gmayor.com/replace_using_wildcards.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
#5
|
|||
|
|||
To be bloody literal-minded about your request, the Find expression
should be ([0-9]{3,4})(p) and the Replace expression should be \1 \2 The {3,4} part of the expression will find times with either three or four digits. The two sets of parentheses divide the found text into the numeric part and the p. Further, if your times include both morning and afternoon, change the Find expression to ([0-9]{3,4})([ap]) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org On Wed, 24 Aug 2005 18:07:04 -0500, "Suzanne S. Barnhill" wrote: You have to divide your "Find what" text into two parts. You then replace with \1 \2 (that is, the first part, followed by a space, followed by the second part). -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "stuart s" wrote in message ... Jay, I have read your post with great interest and I find it enlightning, however, I cannot relate any of your examples to my problem. I am having no problem finding text using wildcards, but replacing the found text with what was found + modifications is my problem. "Jay Freedman" wrote: stuart s wrote: I am searching a text document in Word in order to edit out items that will not import correctly into an Excel Worksheet. The time format in the text document reads, for example. "430p". I would like to find all times in this format by seaching with a wildcard in the format "***p" and replacing with the found characters with a modification as "*** p". The result of the above example would be "430 p". See http://www.gmayor.com/replace_using_wildcards.htm. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
A way to replace text | Microsoft Word Help | |||
End/FootNote text style | Page Layout | |||
I want to replace black text with a different text of another colo | Microsoft Word Help | |||
Highlight Text Replace | Microsoft Word Help | |||
Outline | Page Layout |