How to tell if a string contains characters in Hebrew using PHP?

hebrew, php, regex

Solution

If the source string is UTF-8 encoded, then the simpler approach would be using `\p{Hebrew}` in the regex.

The call also should have the `/u` modifier.

 = preg_match("/\p{Hebrew}/u", $string)

Problem

Trying to figure out how to tell whether a string contains any characters in Hebrew with no luck. How can this be done?

Original source

Related problems