[Solved] Checking a string contains no alpha characters [closed]


Use Unicode Character Properties.

/^\P{L}*$/

will match only if there are only non letters from start of the string till the end.

\p{L} any kind of letter from any language ==> \P{L} is the negation.

Note: Unicode character properties are not supported by all regex flavours.

solved Checking a string contains no alpha characters [closed]