A Microsoft Office (Excel, Word) forum. OfficeFrustration

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 » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

What is wrong with this wildcard search?



 
 
Thread Tools Display Modes
  #1  
Old August 8th, 2009, 05:22 PM posted to microsoft.public.word.docmanagement
Paul B[_11_]
external usenet poster
 
Posts: 50
Default What is wrong with this wildcard search?

I've got a doc with several instances like this one:

LECTURE IX
CONVERSION

I'm trying to change that to:

Lecture IX: CONVERSION

This search string, with wildcards enabled,

LECTURE ([A-Z]{1,5})

does select the first line, above. But if I add a captu

LECTURE ([A-Z]{1,5})\1

I get no hits. I can't see what I've done wrong here.

Thanks,
p.

--
Using Office 2003 sp3 on Windows XP Home
Behold, I will allure her, I will lead her into the wilderness
and speak tenderly to her - Ho. 2.14.
http://onfollowingchrist.wordpress.com/
  #2  
Old August 8th, 2009, 05:37 PM posted to microsoft.public.word.docmanagement
Tony Jollans
external usenet poster
 
Posts: 1,297
Default What is wrong with this wildcard search?

I think you're trying to do what Word already does for you. The
parenthesised expression is 'captured' automatically and "\1" can be used to
position it in the replace string without you needing to do anything. Adding
to the Find string means Word is looking for "\1" after your string, and
can't find it.

--
Enjoy,
Tony

www.WordArticles.com

"Paul B" wrote in message
...
I've got a doc with several instances like this one:

LECTURE IX
CONVERSION

I'm trying to change that to:

Lecture IX: CONVERSION

This search string, with wildcards enabled,

LECTURE ([A-Z]{1,5})

does select the first line, above. But if I add a captu

LECTURE ([A-Z]{1,5})\1

I get no hits. I can't see what I've done wrong here.

Thanks,
p.

--
Using Office 2003 sp3 on Windows XP Home
Behold, I will allure her, I will lead her into the wilderness
and speak tenderly to her - Ho. 2.14.
http://onfollowingchrist.wordpress.com/


  #3  
Old August 8th, 2009, 06:40 PM posted to microsoft.public.word.docmanagement
Paul B[_11_]
external usenet poster
 
Posts: 50
Default What is wrong with this wildcard search?

On Sat, 8 Aug 2009 17:37:29 +0100, Tony Jollans wrote:

I think you're trying to do what Word already does for you. The
parenthesised expression is 'captured' automatically and "\1" can be used to
position it in the replace string without you needing to do anything. Adding
to the Find string means Word is looking for "\1" after your string, and
can't find it.


Tony, did I ever tell you you're absolutely brilliant? g

Thanks,
p.
--
Using Office 2003 sp3 on Windows XP Home
Behold, I will allure her, I will lead her into the wilderness
and speak tenderly to her - Ho. 2.14.
http://onfollowingchrist.wordpress.com/
 




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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:53 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.