Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
Ben K. Bullock
 
Posts: n/a
Default Search and replace with wildcards

Using wildcards, when I try to find

(Fig.)([0-9]{1,})

and replace it with

\1 \2

instead of replacing "Fig.11" with "Fig. 11", it replaces "Fig.11" with
"Fig.11 " (with a space after the 11 rather than before it). I must be
missing something obvious, but what is it?

Thank you for any help with this problem.

  #2   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default Search and replace with wildcards

It works fine here. Are you sure there isn't a space after \2 ?
I noticed when testing that the apparent spacing after 11 changes, making
the gap between it and " larger, though there is no physical space inserted.
Check with $B"y(B or CTRL+*

--

Graham Mayor - Word MVP

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


Ben K. Bullock wrote:
Using wildcards, when I try to find

(Fig.)([0-9]{1,})

and replace it with

\1 \2

instead of replacing "Fig.11" with "Fig. 11", it replaces "Fig.11"
with "Fig.11 " (with a space after the 11 rather than before it). I
must be missing something obvious, but what is it?

Thank you for any help with this problem.



  #3   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default Search and replace with wildcards

"Check with $B"y(B" should have read "Check with ¶"
Please use plain text for your messages in this forum.

--

Graham Mayor - Word MVP

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


Graham Mayor wrote:
It works fine here. Are you sure there isn't a space after \2 ?
I noticed when testing that the apparent spacing after 11 changes,
making the gap between it and " larger, though there is no physical
space inserted. Check with $B"y(B or CTRL+*


Ben K. Bullock wrote:
Using wildcards, when I try to find

(Fig.)([0-9]{1,})

and replace it with

\1 \2

instead of replacing "Fig.11" with "Fig. 11", it replaces "Fig.11"
with "Fig.11 " (with a space after the 11 rather than before it). I
must be missing something obvious, but what is it?

Thank you for any help with this problem.



  #4   Report Post  
Posted to microsoft.public.word.newusers
Ben K. Bullock
 
Posts: n/a
Default Search and replace with wildcards

"Graham Mayor" wrote in message
...
It works fine here. Are you sure there isn't a space after \2 ?


Yes, that was the first thing I checked.

I noticed when testing that the apparent spacing after 11 changes, making
the gap between it and " larger, though there is no physical space
inserted. Check with $B"y(B or CTRL+*


After my frustrating experiences with this on the original document, I tried
it out on a blank document to which I had inserted a little text (not from
the original document) and found that it worked correctly. Unfortunately I
can't provide the original document for perusal because of confidentiality,
but this may have been some kind of bug or problem with that document in
particular. I really don't understand how that could happen in one document
and not another, but I'm not an expert on MS Word at all.

Thanks for the help anyway.



  #5   Report Post  
Posted to microsoft.public.word.newusers
Tony Jollans
 
Posts: n/a
Default Search and replace with wildcards

It works fine for me here and now, but ...

I remember a thread a few weeks back where, under certain conditions,
replacement elements were used in the wrong order - at the time I could
reproduce it but can't remember the details.

--
Enjoy,
Tony

"Ben K. Bullock" wrote in message
...
Using wildcards, when I try to find

(Fig.)([0-9]{1,})

and replace it with

\1 \2

instead of replacing "Fig.11" with "Fig. 11", it replaces "Fig.11" with
"Fig.11 " (with a space after the 11 rather than before it). I must be
missing something obvious, but what is it?

Thank you for any help with this problem.





  #6   Report Post  
Posted to microsoft.public.word.newusers
Tony Jollans
 
Posts: n/a
Default Search and replace with wildcards

Having realised that you are working with Japanese I think this issue may be
related to Japanese language options in Word - I will see if I can pin
anything down.

--
Enjoy,
Tony

"Tony Jollans" My Forename at My Surname dot com wrote in message
...
It works fine for me here and now, but ...

I remember a thread a few weeks back where, under certain conditions,
replacement elements were used in the wrong order - at the time I could
reproduce it but can't remember the details.

--
Enjoy,
Tony

"Ben K. Bullock" wrote in message
...
Using wildcards, when I try to find

(Fig.)([0-9]{1,})

and replace it with

\1 \2

instead of replacing "Fig.11" with "Fig. 11", it replaces "Fig.11" with
"Fig.11 " (with a space after the 11 rather than before it). I must be
missing something obvious, but what is it?

Thank you for any help with this problem.





  #7   Report Post  
Posted to microsoft.public.word.newusers
Ben K. Bullock
 
Posts: n/a
Default Search and replace with wildcards

"Tony Jollans" My Forename at My Surname dot com wrote in message
...
Having realised that you are working with Japanese I think this issue may
be
related to Japanese language options in Word - I will see if I can pin
anything down.


In this case I wasn't working with Japanese. The other problem I've had
recently was with the Japanese "degrees centigrade" marks, which I wanted to
turn into Western "degrees" plus "C", but in this case it was just a problem
in English in an English language file. As I mentioned, it only happened
with that file. I should have tested it on another file but it was the first
time I had tried to use Microsoft Word regular expressions so I panicked and
asked about the problems here rather than carefully studying it.

I would be happy to present the original file which caused the problems here
for perusal but unfortunately a confidentiality agreement forbids this, so I
don't think there is anything much else to say about the topic unless I can
get a working example in another file. Without being able to show you the
problem-causing file I feel that I am sending you on a wild goose chase.

Thanks very much to everyone who tried to help. Next time I'll try to
reproduce the problems in a small sample file before requesting help here.


  #8   Report Post  
Posted to microsoft.public.word.newusers
Tony Jollans
 
Posts: n/a
Default Search and replace with wildcards

I was mistaken. The previous time I saw this - and I can still replicate
it - was in documents with Track Changes enabled. Not everyone experiences
it so there is some other factor but I don't, at the moment, know what it
is.

I don't know how (at least not easily) to add a link to another thread but
for reference I came across this in a post in
microsoft.public.word.docmanagement newsgroup, dated 23 Feb, from indeego,
and titled "Word Bug: Find/Replace wildcard while track changes turned on is
buggy"

--
Enjoy,
Tony

"Ben K. Bullock" wrote in message
...
"Tony Jollans" My Forename at My Surname dot com wrote in message
...
Having realised that you are working with Japanese I think this issue

may
be
related to Japanese language options in Word - I will see if I can pin
anything down.


In this case I wasn't working with Japanese. The other problem I've had
recently was with the Japanese "degrees centigrade" marks, which I wanted

to
turn into Western "degrees" plus "C", but in this case it was just a

problem
in English in an English language file. As I mentioned, it only happened
with that file. I should have tested it on another file but it was the

first
time I had tried to use Microsoft Word regular expressions so I panicked

and
asked about the problems here rather than carefully studying it.

I would be happy to present the original file which caused the problems

here
for perusal but unfortunately a confidentiality agreement forbids this, so

I
don't think there is anything much else to say about the topic unless I

can
get a working example in another file. Without being able to show you the
problem-causing file I feel that I am sending you on a wild goose chase.

Thanks very much to everyone who tried to help. Next time I'll try to
reproduce the problems in a small sample file before requesting help here.




  #9   Report Post  
Posted to microsoft.public.word.newusers
Ben K. Bullock
 
Posts: n/a
Default Search and replace with wildcards

"Tony Jollans" My Forename at My Surname dot com wrote in message
...
I was mistaken. The previous time I saw this - and I can still replicate
it - was in documents with Track Changes enabled. Not everyone experiences
it so there is some other factor but I don't, at the moment, know what it
is.


Thank you very much for that insight. I went back to the original document
and tried again with "track changes" turned off, and found that now it does
work correctly, with the space between the Fig. and the number being
inserted correctly. So I assume it's a bug in Word. What is a good
workaround for this kind of bug? If I turn off track changes and do the
change, is it possible to then get the changes recorded?

Anyway, thank you again for your insight.

This newsgroup is a great source of extremely valuable information.


  #10   Report Post  
Posted to microsoft.public.word.newusers
Tony Jollans
 
Posts: n/a
Default Search and replace with wildcards

Sorry but I don't know any workaround.

--
Enjoy,
Tony

"Ben K. Bullock" wrote in message
...
"Tony Jollans" My Forename at My Surname dot com wrote in message
...
I was mistaken. The previous time I saw this - and I can still replicate
it - was in documents with Track Changes enabled. Not everyone

experiences
it so there is some other factor but I don't, at the moment, know what

it
is.


Thank you very much for that insight. I went back to the original document
and tried again with "track changes" turned off, and found that now it

does
work correctly, with the space between the Fig. and the number being
inserted correctly. So I assume it's a bug in Word. What is a good
workaround for this kind of bug? If I turn off track changes and do the
change, is it possible to then get the changes recorded?

Anyway, thank you again for your insight.

This newsgroup is a great source of extremely valuable information.




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
Pasting into a search and replace Ben K. Bullock New Users 6 March 6th 06 05:50 AM
Search and Replace not working if I select a Format for Heading St Sherrie Deen Microsoft Word Help 0 April 27th 05 08:53 PM
Search and replace problem Jan Kronsell New Users 7 March 30th 05 09:57 AM
search and replace symbol characters Patricia G. Kurz Microsoft Word Help 1 December 29th 04 03:11 AM
search and replace symbols pattyjo Microsoft Word Help 2 December 29th 04 03:10 AM


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