<?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];
You have javascript disabled. You will not be able to edit any code.