3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "You can use any regular expression pression inside the lookahead "; if (preg_match('~^(.*?\w\W+)pression(\W+\w.*)$~is', $text, $m)) { echo $m[1] . " << | >> " . $m[2]; }
Output for 7.3.0 - 7.3.30, 7.4.0 - 7.4.23, 8.0.0 - 8.0.10, 8.1rc1
You can use any regular expression << | >> inside the lookahead

preferences:
47.29 ms | 459 KiB | 5 Q