I have a Google form field, that contains 1 or more Id's
Patterns:
- The IDs are always 6 numbers.
- If only one ID is entered, a comma and a space is NOT required.
- If more than one ID is entered, a comma and a space is required.
- If more than one ID is entered, the last ID, should not have a comma or a space at the end.
Allowed Examples:
- a single ID: 123456
- multiple ID: 123456, 456789, 987654
Here is my current REGEX (does not work correctly)
[0-9]{6}[,\s]?([0-9]{6}[,\s])*[0-9]?
What am I doing wrong?