3v4l.org

run code in 300+ PHP versions simultaneously
<?php $motif = '~\bAncré\b~u'; $textes = array('Ancré', 'ancré', ' Ancré', ' ancré', 'Ancrés', 'ancrés', ' Ancrés', ' ancrés', 'Ancré,'); foreach($textes as $texte) { if (preg_match($motif, ' ' . $texte)) { echo 'Jes ', $motif, ' |', $texte, '|<br />', PHP_EOL; } else { echo '<em>Ne ', $motif, ' |', $texte, '|</em><br />', PHP_EOL; } }

preferences:
34.44 ms | 402 KiB | 5 Q