So can someone elaborate on why the above split operation on
captured regexp results seems
to bugger up the other captured results? Does this issue
extend to any operation on
captured regexp results?
That’s what you get for using the (thread-local) global variables that
change with each regexp operation.
Regexp.match returns a MatchData object that will allow you to save your
results from a previous operation and not have them changed by later
code.