We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write a simple regex to validate a username. Allowed characters are:
Length should be between 4 and 16 characters (both included).
def validate_usr(username): #your code here
def validate_usr(username): return re.match('^[a-z0-9_]{4,16}$', username) != None
See on CodeWars.com
The text was updated successfully, but these errors were encountered:
8kyuKatas
Sorry, something went wrong.
No branches or pull requests
CodeWars Python Solutions
Simple validation of a username with regex
Write a simple regex to validate a username. Allowed characters are:
Length should be between 4 and 16 characters (both included).
Given Code
Solution
See on CodeWars.com
The text was updated successfully, but these errors were encountered: