You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Regular expressions (regexpregexp) help us match or search for patterns in strings. In this problem, you will be given a username. Your task is to check whether that username is valid. A valid username will have the following properties:
3
+
1. The username can contain alphanumeric characters and/or underscores(_).
4
+
2. The username must start with an alphabetic character.
5
+
8 ≤≤ |Username| ≤≤ 30.
6
+
To simplify your task, we have provided a portion of the code in the editor. You just need to write down the regexregex pattern which will be used to validate the username input.
7
+
8
+
Input Format
9
+
The first line of input contains an integer NN, representing the number of testcases. Each of the next NN lines contains a string that represents a username.
10
+
Constraints
11
+
The username consists of any printable characters.
12
+
1≤N≤1001≤N≤100
13
+
Output Format
14
+
For each username, output Valid if the username is valid; otherwise, output Invalid.
0 commit comments