You are viewing a single comment's thread from:

RE: The 5 Rules of a Valid Username on the Steem Blockchain (and a 3 SBD contest to make an account name validation RegEx)

in #programming8 years ago (edited)

I did it! You weren't far! You just had to delete the first character acceptance in your last .-., since the previous section already ended in letter/number.

^[a-z](-[a-z0-9](-[a-z0-9])*)?(-[a-z0-9]|[a-z0-9])*(?:\.[a-z](-[a-z0-9](-[a-z0-9])*)?(-[a-z0-9]|[a-z0-9])*)*$

Now wondering if it's possible to add a maximum number of characters in this regex.