I use the following code to check for a string where all characters are uppercase:
if (preg_match('/^[\p{Lu}]+$/', $word)) {
This works great in English, but it is not possible to detect letters with accents, Russian letters, etc. Is \ p {Lu} supposed to work in all languages? Is there a better approach?
source share