Hi,
I am trying to create regex that will parse digits input like: digit1 - digit2 OR digit1 - digit2,digit3 - digit4,digit5 - digit6,digit7 - digit8......
With examples:
ex1. 1-3
ex2. 1-3,5-7
ex3. 1-3,5-7,10-15
ex4. 1-3,7-10,12-15,19-25
...
Please note that last char should not be "," and there should not be two or more "-" like 1-5-10!
If anyone can help me with JavaScript regex, thanks in advance!


Reply With Quote



Bookmarks