Reply
 
Thread Tools Display Modes
  #1   Report Post  
HONYAKUKA
 
Posts: n/a
Default Replace and retain whatever the wildcard represents

Word 2003

Say I want to replace all instances of "No. 1" (and "No. 2" and "No. 3" and so
on) with "Number 1" (and "Number 2" and so on).

Is there a way to change these in one step using Search/Replace? I.e., is
there some process along the lines of the following?

Find what: "No. ^#"
Replace with: "Number [retain the same respective digit]"

(I realize that in the example I used here, I could probably just replace "No."
with "Number" globally, but if there happen to be other instances of "No." in
the document not followed by a digit, this general search/replace would do too
much.)

Thanks.

Jay

  #2   Report Post  
Klaus Linke
 
Posts: n/a
Default

Hi Jay,

Check "Match wildcards",
Find what: No. ([1-9])
Replace with: Number \1

[1-9] matches any digit 1 to 9.
And since it's the 1st expression in brackets, I can re-insert it with \1.

Greetings,
Klaus




"HONYAKUKA" wrote:
Word 2003

Say I want to replace all instances of "No. 1" (and "No. 2" and "No. 3"
and so on) with "Number 1" (and "Number 2" and so on).

Is there a way to change these in one step using Search/Replace?
I.e., is there some process along the lines of the following?

Find what: "No. ^#"
Replace with: "Number [retain the same respective digit]"

(I realize that in the example I used here, I could probably just replace "No."
with "Number" globally, but if there happen to be other instances of "No." in
the document not followed by a digit, this general search/replace would do too
much.)

Thanks.

Jay



Reply
Thread Tools
Display Modes

Posting Rules

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

Forum Jump


All times are GMT +1. The time now is 06:03 PM.

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"