Reply
 
Thread Tools Display Modes
  #1   Report Post  
stuart s
 
Posts: n/a
Default 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   Report Post  
Jay Freedman
 
Posts: n/a
Default

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   Report Post  
stuart s
 
Posts: n/a
Default

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   Report Post  
Suzanne S. Barnhill
 
Posts: n/a
Default

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   Report Post  
Jay Freedman
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A way to replace text Joe McGuire Microsoft Word Help 10 August 25th 05 05:52 PM
End/FootNote text style Shaun Page Layout 4 July 5th 05 04:36 PM
I want to replace black text with a different text of another colo Oftheson Microsoft Word Help 2 March 9th 05 11:41 PM
Highlight Text Replace HBM Microsoft Word Help 1 March 8th 05 04:00 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 03:49 PM


All times are GMT +1. The time now is 02:12 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"