View Single Post
 
Old 07-23-2025, 02:15 PM
macropod's Avatar
macropod macropod is online now Windows 10 Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,465
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

Quote:
Originally Posted by ayomama View Post
Now, what is the pattern to fully match @PART_01 and @ERTDRETHH ?


In other words, I'm looking for the syntax to make the last 3 characters "_01" optional. The 3rd character from last (if present) is always an underscore and the next 2 are numbers.
You could use a wildcard Find expression like:
strSearch = "\@[A-Z]{2}[A-Z_0-9]{1,}"
but you may get false matches
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote