Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2018, 07:26 AM
Ulodesk Ulodesk is offline Wild card confusion Windows 7 64bit Wild card confusion Office 2013
Word 2013 Expert Cert
Wild card confusion
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 08-22-2018, 08:26 AM
Robert2 Robert2 is offline Wild card confusion Windows 10 Wild card confusion Office 2007
Competent Performer
 
Join Date: Jun 2013
Posts: 165
Robert2 will become famous soon enoughRobert2 will become famous soon enough
Default

Use the following pattern:
<[!O]*> <*>^13
Reply With Quote
  #3  
Old 08-22-2018, 01:10 PM
Ulodesk Ulodesk is offline Wild card confusion Windows 7 64bit Wild card confusion Office 2013
Word 2013 Expert Cert
Wild card confusion
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default 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.
Reply With Quote
  #4  
Old 08-22-2018, 02:21 PM
macropod's Avatar
macropod macropod is offline Wild card confusion Windows 7 64bit Wild card confusion Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #5  
Old 08-23-2018, 06:06 AM
Ulodesk Ulodesk is offline Wild card confusion Windows 7 64bit Wild card confusion Office 2013
Word 2013 Expert Cert
Wild card confusion
 
Join Date: Sep 2009
Location: Virginia
Posts: 866
Ulodesk is on a distinguished road
Default Thanks

Much obliged, Paul.
Reply With Quote
Reply



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
Wild card confusion find with wild cards and add into CC sylvio Word VBA 2 09-04-2017 01:00 AM
Wild card confusion 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft