I need help with a Regex expression to valid an ID pattern which is 7 characters where the first position is Alpha (A-Z) and ignore case and last 6 is Numeric (0-9).
Example: X155230 or x155230
Thanks guys.
This should work:
/^[a-z]\d{6}$/i
i flag), and accuracy (the \d in many regex engines means more than 0-9, it can include extra unicode digits from other languages.) That said, these differences are likely insignificant in this example, and either expression will work just fine.It's quite simple:
/^[A-Z]{1}[0-9]{6}$/i