Returns: Nothing if the regex did not match the
string, or:
Just an array of (offset,length) pairs where index 0 is whole match, and the rest are the captured subexpressions.
Matches a regular expression against a buffer, returning the buffer
indicies of the match, and any submatches