I have user input that I want to check for correctness. The user must enter 1 or more character sets separated by commas.
So this is a valid input
they are wrong
- COM - only 3 characters
- COM1,123 - one set - only 3 characters.
- COM1.1234, abcd - non-comma separator of points
I looked for a regex pattern for it and found a possible pattern that checked a repeating instance of any three characters, and I changed like that
/ ^ (. {4}). * \ 1 $ /
but it does not find a match.
I can control the last comma, which may or may not be there before moving on to the test so that it always is.
It is advisable that I test letters (in any case) and only numbers, but I can live with any characters.
, VBA, , , , , .