|
This deprecates unapplySeq(Any) and adds overloaded
unapplySeq(CharSequence) and unapplySeq(Match), with the
putative advantage that you can't try to extract the unextractable.
Regex is massaged so that the underlying Pattern is primary,
rather than the String-valued expression. Regex and its
unanchored companion (I almost wrote unmoored) share a
Pattern object, so that unapplySeq(Match) can easily test
whether the Match was generated by this Regex; in that case,
the match result is used immediately, instead of reapplying
the regex to the matched string.
The documentation is massaged to reflect unanchored and also to
align with the underlying terminology, e.g., "subgroup" really
just means "group."
|