Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Ed from AZ Ed from AZ is offline
external usenet poster
 
Posts: 91
Default Help with wildcard Replace syntax, please?

I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Help with wildcard Replace syntax, please?

You must enter into the Replace box exactly what it is that you want to be
used as the replacement

Though, you could have used

([ ]{4}) [0-9]{2}

in the Find what control and then

\1\1 a

in the Replace with control

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Ed from AZ" wrote in message
...
I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Help with wildcard Replace syntax, please?

You must enter into the Replace box exactly what it is that you want to be
used as the replacement

Though, you could have used

([ ]{4}) [0-9]{2}

in the Find what control and then

\1\1 a

in the Replace with control

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Ed from AZ" wrote in message
...
I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Help with wildcard Replace syntax, please?

Hi Ed from AZ,

You can't use the character count expression in the Replace field - you need to explicitly input the # characters or, as Doug has
done, employ a suitable expression from the Find field.

--
Cheers
macropod
[Microsoft MVP - Word]


"Ed from AZ" wrote in message ...
I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed


  #5   Report Post  
Posted to microsoft.public.word.docmanagement
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Help with wildcard Replace syntax, please?

Hi Ed from AZ,

You can't use the character count expression in the Replace field - you need to explicitly input the # characters or, as Doug has
done, employ a suitable expression from the Find field.

--
Cheers
macropod
[Microsoft MVP - Word]


"Ed from AZ" wrote in message ...
I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Help with wildcard Replace syntax, please?

Others have responded to the immediate issue, but see also
http://www.gmayor.com/replace_using_wildcards.htm
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Ed from AZ" wrote in message
...
I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed



  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Help with wildcard Replace syntax, please?

Others have responded to the immediate issue, but see also
http://www.gmayor.com/replace_using_wildcards.htm
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Ed from AZ" wrote in message
...
I tried a wildcard Find/Replace:
-- Find: 5 spaces, any combination of 2 numbers, a period
( {5,})[0-9]{2,}.
-- Replace: 9 spaces, then "a."
( {9})a.

Find worked. Replace gave me: " {9}a."

I gave up trying to code it and just typed 9 spaces! 8/
Is there something special I needed to do in the Replace box?

Ed



  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Ed from AZ Ed from AZ is offline
external usenet poster
 
Posts: 91
Default Help with wildcard Replace syntax, please?

Thanks, Doug, macropod, and Graham. I've tried to master the wildcard
Find - but forgot to spend time on Replace! (Other than the ^13 - ^p
gotcha that was explicitly called out.)

Cheers!
Ed
  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Ed from AZ Ed from AZ is offline
external usenet poster
 
Posts: 91
Default Help with wildcard Replace syntax, please?

Thanks, Doug, macropod, and Graham. I've tried to master the wildcard
Find - but forgot to spend time on Replace! (Other than the ^13 - ^p
gotcha that was explicitly called out.)

Cheers!
Ed
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
Wildcard Search and Replace Johann Swart Microsoft Word Help 11 May 8th 09 03:37 PM
Wildcard Search/Replace Tom K Microsoft Word Help 3 April 21st 09 03:27 PM
Find and replace using wildcard Jan Kronsell New Users 2 February 21st 09 09:53 PM
Help with Wildcard search/replace, please? Ed Microsoft Word Help 1 July 14th 06 12:48 AM
Bizarre wildcard replace cfulmer Microsoft Word Help 2 January 29th 06 07:15 AM


All times are GMT +1. The time now is 02:24 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"