Matching with regex groupsλ︎
rematches takes a pattern and compares it with a string.
If the pattern does not match the string then
nil is returned to show the function returned a false value.
If the pattern matches but there are groups, a vector of matching strings is returned. The first element in the vector is the entire match. The remaining elements are the group matches.