I need a regular expression that accepts only Greek chars and spaces for a name field in my form (PHP). I\'ve tried several findings on the net but no luck. Any help will be
I'm not too current on the Greek alphabet, but if you wanted to do this with the Roman alphabet, you would do this:
/^[a-zA-Z\s]*$/
So to do this with Greek, you replace a
and z
with the first and last letters of the Greek alphabet. If I remember right, those are α
and ω
. So the code would be:
/^[α-ωΑ-Ω\s]*$/