#1
|
|||
|
|||
Wild card confusion
Hello. I'm experimenting with simple wildcard searches. My document consists of the following list:
John Newman Al Framly Jack Willis Bill Bond Oliver James (<[!O][A-z]{2,}) ([A-z]{2,})^13 (<[!O][*]{2,}) ([A-z]{2,})^13 The first of the two search commands finds the first, third, and fourth names, but skips the second for some reason I can not fathom. The second search command, which I thought would also find the two search command strings, since they start with a non-alphabet character, finds nothing, nor does it work if I replace the asterisk with a ?, or remove the <[!O]. I would greatly appreciate an explanation. |
#2
|
|||
|
|||
Use the following pattern:
<[!O]*> <*>^13 |
#3
|
|||
|
|||
Almost...
Thank you for your reply. Your solution finds the names, though it includes more than a paragraph at a time, but it does not find the last two lines.
|
#4
|
||||
|
||||
Your 1st Find expression doesn't find 'Al Framly' because you've specified there must be at least two characters between the starting letter and the space, whereas that example has only one.
Your 2nd Find expression doesn't doesn't work because of the[*]. Changing that to just * would work, after a fashion, but the results aren't what you'd want. I doubt you'd want matches with any of [\]^_`, either, which is what [A-z] would give you. Try any of: (<[!O][A-Za-z]{1,}) ([A-Za-z]{1,})^13 (<[!O][A-Za-z]@) ([A-Za-z]{1,})^13 (<[!O][A-Za-z]{1,}) ([A-Za-z]@)^13 (<[!O][A-Za-z]@) ([A-Za-z]@)^13
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thanks
Much obliged, Paul.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wild Card Problem (Word 2007) | qubie | Word VBA | 5 | 10-19-2017 06:19 AM |
How to use wild card in VBA for Advance Filter? | LearnerExcel | Excel Programming | 1 | 10-09-2017 12:27 AM |
find with wild cards and add into CC | sylvio | Word VBA | 2 | 09-04-2017 01:00 AM |
Question about find and replace wild cards | catherineliang | Word | 1 | 07-21-2014 09:42 PM |
Wild card to highlight capitalised terms? | bertietheblue | Word | 2 | 02-08-2013 04:44 PM |