For a study I am doing everyone gets assigned a unique number. All unique numbers are divisble by 11 (this is done because it makes sequential numbers quite different from each other).
I would ideally like a regex which I can use to check that the number entered in the study_id field is an acceptable value - e.g divisible by 11. I will have leading zeroes to a maximum of 5 digits So:
- 00011 - Acceptable
- 00012 - Not Acceptable
- 13211 - Acceptable
- 13221 - Not Acceptable
Any suggestions gratefully received