Our group is developing surveys for a large study, and we give each participant an ID number. For new participants, the format is "AJA-XXXX" where the X's are digits 0-9. For visiting participants, the format is "AJA-XXXX.X." Here are some ID numbers that fit:
> * 1. AJA-2001
> * 2. AJA-2163
> * 3. AJA-2003.1
> * 4. AJA-2002.2
>
However, we don't want the following:
> * aja-2002 (first part not capitalized)
> * AJA3012 (no dash)
> * AJA-2009. (a period, but no digit afterwards)
> * AJA-1008.01 (two digits after the period)
>
After some googling, I came up with ``[t][r][t]\\-\\d{4}[\\.]?[\\d{1}]?`` but it didn't work
I would be extremely grateful for any help or suggestions. Thanks!
Best answer by TomG
View original