I’ve been here in a battle because of regular expressions ..
I’m getting something like that [5.00,10.00,20.00] and I want to get just the numbers that is, 5.00, 10.00 and 20.00. And do not get tou get a regex that I do this separation
In this case I’m only getting 3 numbers, but can I get more than three.
Someone can help me in the regular expression to do this?
Thanks
Here’s one suggestion:
You could also strip out
[and]usingString.substringwithout regular expressions.Note that
splitdoesn’t handle the empty string very well in this situation. If you may get"[]"as input, I suggest you do something like