I am trying to figure out how best to do this regex.
Here are my requirements:
- Up to 8 characters
- Can only be alphanumeric
- Can only contain up to three alpha characters [az] (valid zero alpha characters)
Any ideas would be appreciated.
This is what I got so far, but it only searches for adjacent letters:
^(\d|([A-Za-z])(?!([A-Za-z]{3,}))){0,8}$
source
share