I don’t know if there’s anything out there now (there might be), but it
seems pretty simple. Just split on either \d+ or \D+, depending
(unless I’m missing something in your requirement)?
I don’t know if there’s anything out there now (there might be), but
it
seems pretty simple. Just split on either \d+ or \D+, depending
(unless I’m missing something in your requirement)?
<please don’t quote signatures>
I sort of got hung up on doing this with split. Using scan might be
easier than split. However it is worth noting that when you are
splitting on a pattern you can keep what the pattern matches in the
results array by capturing with a set of ()s. Compare these two
statements: