Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I am trying to do a wildcard search that should begin its match in the text
of a hyperlink and continue to match characters outside of the hyperlink. It seems like the boundary of the hyperlink contains a character that I cannot match. I can break the search into two pieces and each component works properly. The two expressions find text that appears to be contiguous, but when the components are combined into one search, it does not match. Here is a very simplified example where the a tag indicates the link, but does not actually appear in the text of the Word document. Word Document - aThe Link/a does not match Find - The link? No match I hope I have explained the problem clearly and someone can help. Thanks. |
#2
![]() |
|||
|
|||
![]()
Hi Makhtar,
Sorry: Wildcards don't work at all with fields. Maybe you can match the text with a regular "Find"? ^? will then match any character (... if I read your "Find - The link?" = correctly that you want to match the field and the following character). Else, you'd need to locate the hyperlink field (with Find or by looping = all fields) and then have the maco select the text as neccessary. Regards, Klaus "Makhtar" wrote: I am trying to do a wildcard search that should begin its match in the = text=20 of a hyperlink and continue to match characters outside of the = hyperlink. It=20 seems like the boundary of the hyperlink contains a character that I = cannot=20 match. =20 I can break the search into two pieces and each component works = properly.=20 The two expressions find text that appears to be contiguous, but when = the=20 components are combined into one search, it does not match. =20 Here is a very simplified example where the a tag indicates the = link, but=20 does not actually appear in the text of the Word document. =20 Word Document - aThe Link/a does not match =20 Find - The link? =20 No match =20 I hope I have explained the problem clearly and someone can help. = Thanks. |
#3
![]() |
|||
|
|||
![]()
Thanks for the quick response Klaus. I can't use a regular find. I had
simplified the example to demonstrate the problem, but my actual expression after the link is more complicated. I was hoping I could do it with a single search and replace, but you are right, I will need to write some real code to select the text. Thanks again, Makhtar "Klaus Linke" wrote: Hi Makhtar, Sorry: Wildcards don't work at all with fields. Maybe you can match the text with a regular "Find"? ^? will then match any character (... if I read your "Find - The link?" correctly that you want to match the field and the following character). Else, you'd need to locate the hyperlink field (with Find or by looping all fields) and then have the maco select the text as neccessary. Regards, Klaus "Makhtar" wrote: I am trying to do a wildcard search that should begin its match in the text of a hyperlink and continue to match characters outside of the hyperlink. It seems like the boundary of the hyperlink contains a character that I cannot match. I can break the search into two pieces and each component works properly. The two expressions find text that appears to be contiguous, but when the components are combined into one search, it does not match. Here is a very simplified example where the a tag indicates the link, but does not actually appear in the text of the Word document. Word Document - aThe Link/a does not match Find - The link? No match I hope I have explained the problem clearly and someone can help. Thanks. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I turn select text on and use Find to select a block of te. | Microsoft Word Help | |||
how do I find a hyperlink target in a word document | Microsoft Word Help | |||
Mirror Text Box | Formatting Long Documents | |||
change all caps in text to small lettering using find and replace. | New Users | |||
Outline | Page Layout |