Thread: [Solved] Regex-pattern
View Single Post
 
Old 12-30-2024, 07:56 AM
mstde mstde is offline Windows 11 Office 2019
Novice
 
Join Date: Dec 2024
Posts: 2
mstde is on a distinguished road
Default Regex-pattern

Hi,

i wouild like to use a regex-pattern to identify names in a given text. The structure of the text is always the same. The section with the name in a sentence starts with a comma, the comes the name, another comma and further text.
I cannot figure out, how to stop at the first comma after the name:

some text some text, Pep Guardiola, some text some text, some text some text.

my pattern is: ,\s.*, - but it matches up to the third coma: , Pep Guardiola, some text some text,

I tried it on regex101.com for a while, but i cannot figure it out
How is the pattern to be formulated, to match just , Pep Guardiola, ?

Any help is appreciated.

Regards

Michael