Reverse Regex
A reverse regex is a library that produces a string based on a regex. The resulting string satisfies the regex.
Such a tool is good for testing, so as to find possible regexploits, or simple loopholes in the original regex.
<?php
preg_match('/(foo)(bar)(baz)/', 'foobarbaz', $matches, PREG_OFFSET_CAPTURE);
print_r($matches);
?>