Generation

generate functionFri, 23 Dec 2022

Write a simple regex to validate a username. Allowed characters are: lowercase letters, numbers, underscore Length should be between 4 and 16 characters (both included).

my_regex = re.compile(r"[a-z][A-Z][0-9]{4,16}")

Questions about programming?Chat with your personal AI assistant