3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~ ^ (?! .* [^\PL\p{Latin}] ) .+ $ ~mux'; $str = ' # good alpha + beta = gamma LHOOQ 13.70€ Gruvrået .... oeuärē a aaà 2323442 üúôÆaaë # uglу <-- the "у" character is U+0443 CYRILLIC SMALL LETTER U (even if it\'s looks like the ASCII "y") delta Δ Дмитрий Дмитриевич Шостакович طاهر بن جلون'; preg_match_all($re, $str, $matches, PREG_SET_ORDER); // Print the entire match result print_r(array_merge(...$matches));

preferences:
22.48 ms | 406 KiB | 5 Q