Allows pattern matching against a match's capturing groups, with a List of Options (None if null or empty, Some(str) otherwise).
Allows pattern matching against a match's capturing groups, with a List of Options (None if null, Some(str) otherwise).
Extract a non-null, non-empty named group from a Match
Check if the named group is non-null and non-empty in the Match
Allows direct pattern matching against a match's capturing groups.
Allows direct pattern matching against a match's capturing groups.
List match against the Match's group(i) values, meaning groups may be null or empty. The following matches a Match whose 1st group matched "lit", 2nd empty, any 3rd, 4th null (i.e. wasn't matched, e.g. in an unmatched alternative), any 5th group (extracted), and 0 or more groups afterward:
case MatchGroups("lit", "", _, null, extr, _*) => extr
Pattern Matching & extraction utilities