Is there a way in PHP regular expressions to get all possible regular expression matches, even if matches match?
eg. Get all 3-digit substrings '/ [\ d] {3} /' ...
You can expect:
"123456" => ['123', '234', '345', '456']
But preg_match_all () only returns
['123', '456']
This is due to the fact that it starts searching again after the substring substring (as indicated in the documentation):
"After the first match is found, subsequent searches continue from the end of the last match."
Is there any way around this without writing a custom parser?