good people) Tell me, please, how can you determine the presence of extra characters in the string? The string should consist of only 1) Russian lowercase and uppercase letters and spaces, or 2) words from Russian letters with a capital letter (or two words with capital letters with a hyphen between them)
Those. A string is either a full name together, or a surname, name and patronymic separately.
I read about preg_match, but I really can't compose a template. And in general I am stupid in a terrible way. Or, maybe, you can somehow compare the characters from the array ... Help, please.