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

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -