<?php $matches = []; $str = 'fooxbarx'; preg_match('/(^|\s)x/mu', $str, $matches, PREG_OFFSET_CAPTURE, 0); var_dump($str); var_dump($matches);
You have javascript disabled. You will not be able to edit any code.