<?php $pattern="#[x\{0410}-x\{042F}]#u"; $string="АФ"; echo preg_match ($pattern,$string); ?>
$pattern should match any capital Cyrillic letters
However I get this error preg_match(): Compilation failed: range out of order in character class at offset 10 in /home/ge0rgi/www/preg.php on line 4 Any ideas ?
What is "x{0410}" supposed to represent? As it stands, it represents: the letter 'x', followed by a '}' (which was unnecessarily escaped), followed by the digits '0410', followed by a '}' brace.
Perhaps you meant "\x{0410}" instead?
bradgrafelman;10977379 wrote: Perhaps you meant "\x{0410}" instead?
Exactly thanks a lot