FunctionRacerProblemsRace

Valid Username

EasyStringsPython, JavaScript, TypeScript, Java, C++

Return True if name is a valid username, otherwise False. All of these rules must hold:

Example 1

name "alice_01"
returns true

Eight characters, starts with a letter, one underscore not at the end.

Example 2

name "Alice"
returns false

The first character is an uppercase letter.

Example 3

name "a__b"
returns false

Two underscores sit next to each other.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Strings problems