A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

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.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Wildcards should let me replace text - ***p = 430p, rep w/*** p



 
 
Thread Tools Display Modes
  #1  
Old August 24th 05, 08:31 PM
stuart s
external usenet poster
 
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
Ads
  #2  
Old August 24th 05, 09:01 PM
Jay Freedman
external usenet poster
 
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  
Old August 24th 05, 10:07 PM
stuart s
external usenet poster
 
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  
Old August 25th 05, 12:07 AM
Suzanne S. Barnhill
external usenet poster
 
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  
Old August 25th 05, 12:50 AM
Jay Freedman
external usenet poster
 
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
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 10:41 PM
Highlight Text Replace HBM Microsoft Word Help 1 March 8th 05 03:00 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM


All times are GMT +1. The time now is 04:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.