Regex::find_duplicate_numbers and Regex::explode_alternation both need balanced parentheses and they scan the subject for them one character at a time.
- Would it be possible to use something like in this comment?
- Would it make sense?
- Would the code be simpler of faster?