Hello all,
I'd like to check on a php page that a text string complies with the following rule : Contain numbers, in ascending order, with only , or - as separators
The numbers represent requested items (like pages to print), my purpose is then to count the number of item requested.
1,3,5-6 : Match (4 items)
1,5,10-12,15,25-30,55 : Match (13 items)
1,5-4,7 : No Match (not ascending order)
Any other caracter but 0123456789,- no match
Thanks.