I want to know if a string is a collection of, by example, numbers ([0-9]
).
I this case, i'm using the regular expression [0-9](,[0-9])*
to find one or more numbers separated by commas (A collection of numbers).
Is there a better way to do it? I mean a shorter expression perhaps.