I need Regex for PHP to do the following:
I want to allow [a-zα-ωá-źa-i ա-ֆ ა-ჰ א-ת] and Chinese, Japanese (more than utf-8) letters; I want to ban [^ 98765432100123456789] (Arabic numerals);
This is what I did:
function isValidFirstName($first_name) { return preg_match("/^(?=[a-zα-ωá-ź-ա-ֆა-ჰא-ת]+([a-zα-ωá-ź-ա-ֆა-ჰא-ת' -]+)?\z)[a-zα-ωá-ź-ա-ֆა-ჰא-ת' -]+$/i", $first_name); }
It seems to work, but if I type letters from more than one language, it does not check.
Examples: Avpa Vapapva á-ź John - does not check. John Gger - checks, á-ź á-ź - checks.
I would like to do all this.
Or, if there is a way, an echo message if the user enters a more lingual line.
source share