Like subgroup(), but returns the pair (match, rest) where match is subgroup(condition) and rest is the remaining non-matching part.
builtins/BaseExceptionGroup.split
BaseExceptionGroup.split