For the split bullet, I would actually describe it as "When it's easier to talk about separators" - such as "I want to split on commas" or "I want to separate on colons" or "I want to separate right before each number (not necessarily each digit)".
If this is how you're thinking of the problem, then split is probably the right tool. However, given the original question, I get the feeling that the problem was being thought of as "what to keep" where using match-global is more in line with the real problem. The OP seems to be asking "How do I do X with Y?" - wanting to match stuff with split.
If you take away the context of the question, and it were to become "How do I get this string '1 Cat 2 Dogs 3 Hamsters' to become this list ('1 Cat', '2 Dogs', '3 Hamsters')", then I would think either split or match-global would be perfectly legitimate responses.
|