How can i write a regexp, that will check if string starts and ends with digits and in between contains only digits and comas? Comas must also be separated from each other with at least one digit. For the conditions above i have following regexp: ^\d(,?\d)*$
but i have following additional condition: All comma separated integers, that are composed by sequences of digits, must be different from each other. What would be the regexp that allows only this kind of strings?
Thank you