I have example string like
Я, Филиппова Яна Сергеевна, 17.09.2001 года рождения
I need to extract everything between character Я, (always fixed) and before , 17.09.2001 ( not fixed, can be other date)
I expect Филиппова Яна Сергеевна as output excluding commas
I tried something like Я,(.*)17.09.2001 to match general pattern but it did not worked out
>Solution :
You can use the lookaround syntax:
(?<=Я, )[^,]+(?=, \d+\.\d+\.\d+)
How this works:
(?<=Я, )positive lookbehind to match if there is a literalЯ,(including whitespace) on the left[^,]+one or more characters that are not commas(?=, \d+\.\d+\.\d+)positive lookahead to match if there is a date like string on the right side