Thread: [Solved] Regex-pattern
View Single Post
 
Old 01-05-2025, 12:17 PM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,601
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

batman1,


Obviously you have a better understanding of RegEx patterns than I do. For my purposes, both of your last suggestions worked.


Can you explain their construction? How do they work?


I can follow how either pattern returns a match when a two part name is between the commas e.g.,

Test, Jack Box, end test, test.
or three or more part names e.g.,
Test, Jack in the Box, end test, test.


But how does this pattern ",( [A-Za-zü\-]+)* [A-Z][A-Za-zü\-]+," (or the other) return a match when there is just one name between the commas e.g.,


Test, Jack, end test, test.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/