Thread: [Solved] Regex-pattern
View Single Post
 
Old 01-05-2025, 04:20 AM
vivka vivka is offline Windows 7 64bit Office 2016
Expert
 
Join Date: Jul 2023
Posts: 293
vivka is on a distinguished road
Default

Hi! I support Greg's idea about the pipe symbol or upright slash (|), which means "or". It seems redundant because the asterisk (*) that follows the capturing group means zero or unlimited times. So,
Code:
, [A-Z][A-Za-zü\-]+( [A-Za-zü\-]+)* [A-Z][A-Za-zü\-]+,
is OK.
Besides, this also appears to work, although all situations can't be predicted:
Code:
,\s[A-Z][^0-9,]* [A-Z][A-Za-zü\-]+,