Similar to the stringr::str_match and Javascript String.match.

string_match(string, regex)

Arguments

string

The string to match

regex

The regex to match against

Value

A character vector of the match including groups. NULL if no match.