Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Jan Kronsell Jan Kronsell is offline
external usenet poster
 
Posts: 10
Default Find and replace using wildcard

I have a lot of lines tlike this

xxxxxx(1, sdas...
xxxxxx(2, sdas...
xxxxxx(3, sdas...

The xxxxx can be anything. It always contains a left parenthesis, a number
and a comma, though. I want to replace all numbers with " to make the lines
look like

xxxxxx(", sdas
xxxxxx(", sdas
xxxxxx(", sdas

The numbers can have more than one digit. I have tried a lot of
combinations, but it just tells me, its an invalid search expression for
patterns.

Jan


  #2   Report Post  
Posted to microsoft.public.word.newusers
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Find and replace using wildcard

First make sure the "Use wildcards" option in the More section of the Replace
dialog is checked.

The Find What expression should be

([\(])[0-9]{1,}(,)

and the Replace With expression should be

\1"\2

See http://www.gmayor.com/replace_using_wildcards.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.

On Sat, 21 Feb 2009 19:06:06 +0100, "Jan Kronsell"
wrote:

I have a lot of lines tlike this

xxxxxx(1, sdas...
xxxxxx(2, sdas...
xxxxxx(3, sdas...

The xxxxx can be anything. It always contains a left parenthesis, a number
and a comma, though. I want to replace all numbers with " to make the lines
look like

xxxxxx(", sdas
xxxxxx(", sdas
xxxxxx(", sdas

The numbers can have more than one digit. I have tried a lot of
combinations, but it just tells me, its an invalid search expression for
patterns.

Jan

  #3   Report Post  
Posted to microsoft.public.word.newusers
Jan Kronsell Jan Kronsell is offline
external usenet poster
 
Posts: 10
Default Find and replace using wildcard

Thank you.

Jan

Jay Freedman wrote:
First make sure the "Use wildcards" option in the More section of the
Replace dialog is checked.

The Find What expression should be

([\(])[0-9]{1,}(,)

and the Replace With expression should be

\1"\2

See http://www.gmayor.com/replace_using_wildcards.htm.


I have a lot of lines tlike this

xxxxxx(1, sdas...
xxxxxx(2, sdas...
xxxxxx(3, sdas...

The xxxxx can be anything. It always contains a left parenthesis, a
number and a comma, though. I want to replace all numbers with " to
make the lines look like

xxxxxx(", sdas
xxxxxx(", sdas
xxxxxx(", sdas

The numbers can have more than one digit. I have tried a lot of
combinations, but it just tells me, its an invalid search expression
for patterns.

Jan



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
find and replace using wildcard characters fjfvan New Users 2 January 27th 09 10:19 PM
Find & Replace Wildcard Expression for Ordinal Numbers binar Microsoft Word Help 1 July 27th 07 04:41 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
Replace and retain whatever the wildcard represents HONYAKUKA Microsoft Word Help 2 January 4th 05 04:12 AM


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