Friday, 31 May 2013

Regex to match 1,4;5;22,6;63...

This regex will match comma delimited pairs of integers delimited by semicolon, while upper limit is set to 10000

^([1-9]\d{0,3}|10000),([1-9]\d{0,3}|10000)(;([1-9]\d{0,3}|10000),([1-9]\d{0,3}|10000))*,*$

No comments:

Post a Comment