The problem is your regular expression. You are explicitly saying that you will only accept a b c ... z A B C ... Z
. š
is not in the a-z set. Remember, š
is as different to s
as any other character.
So if you really just want a sequence of letters, then you need to test for the unicode properties. e.g.
echo preg_match('/^[0-9]{4},[\s]*\p{L}+', $post);
That shouuld work because \p{L}
matches any unicode character which is considered a letter. Not just A through Z.