Hello! I need to collect a Id number in a specific format. Only allowed format is XXX-XXXXXXXX. Here, first 3 digits are alphanumeric, then one hyphen(-), then exactly 8 numeric digit. Some examples are:
P57-23454128
KAS-75455329
PE3-41000755
Type of this question is text. I have tried regex formula in these way:
regex(.,’^[0-9][A-Z]{3}[-]{1}[0-9]{8}$’)
regex(.,’^[0-9][A-Z]{3}-[0-9]{8}$’)
Unfortunately, none of them worked for me. I can’t find where I am doing wrong.
Any suggestion please. Thanks in advance.
Hello @tasfik_rukan ,
Also 000-00000000 or ZZZ-99999999 would be valid for the regex solution above. Is this Ok for you? Otherwise, the formula would need adaption for those invalid sequences…
Hi wroos,
Thanks for your reply. Yes, it would be good to know this too… Could you be a little bit of more specific about how to construct this formula that you mentioned? Thanks in advance again.