3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/\w+(?<=ab)(.*?)(?=xx)/m'; $str = '100abababab3x3x3xx1000morewords'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result echo $matches[0][1];

preferences:
44.43 ms | 1942 KiB | 5 Q