Need assistance with regex -
Need assistance with regex -
for regex, want letters a-z 1-4 times followed digit 4-7 times. combination of these 2 should have 8 characters total.
([a-z]{1,4}[0-9]{4,7}){8}
i know wrong. can tell me right regex look create work
you can utilize lookahead based regular look assert string length 8 characters.
^(?=.{8}$)[a-z]{1,4}\d{4,7}$
explanation | live demo
regex
Comments
Post a Comment