extracts groups matched by a regular expression pattern
(string subject, string pattern) -> list
Matches a regular expression
pattern against a given
pattern does not match given
subject in its entirety, returns an empty list.
pattern matches given
subject in its entirety, a list of strings matched by capturing groups is returned.
Index 0 contains the entire input string, and subsequent indexes contain matched groups. Group indexes correspond to the sequence of opening group parentheses of capturing groups in the pattern.
If a group is optional, and is not matched by the input string, its value in the list is
If a capturing group is inside a quantifier, only the last matched string is captured.
nil if any argument is
|string||The string to match|
|string||The regular expression to match|