Matches the input against the regex.
Matches the input against the regex. If the regex matches the input and contains one or more groups, the first group is returned. If there's a match but no group is specified, the match from the entire pattern is returned.
input to match
regex to use
the matched input as described above, or None if the regex did not match the input