Thread: [Solved] Regex-pattern
View Single Post
 
Old 01-06-2025, 06:50 AM
batman1 batman1 is offline Windows 11 Office 2013
Advanced Beginner
 
Join Date: Jan 2025
Posts: 57
batman1 is on a distinguished road
Default

Quote:
Originally Posted by vivka View Post
Or a little shorter:
Code:
, [A-Z]([ A-Za-zü\-])*,
In post #15 Greg's wrote: Specifically the last instance ", John smith," is returned as a match. How could we PREVEN T that?" So Greg's wants to find "John Smith," but he doesn't want to find "John smith,"

Your code will find ", John smith," and that's not what Greg wants.

I also want a simpler pattern, but for now I've provided a pattern that at least meets Greg's requirements.