Download the file and filter down to the username according to criteria below. The username you are looking for hasx
as the 3rd character, followed immediately by a number from2
to6
, it has aZ
character in it and the last character isS
. When you have the username, submit it as the flag. Contents: 50k-users.txt
..x[2-6].*S$
and can be built and tested easily using RegExr. The first two dots match any character, next the x
matches an x
, [2-6]
matches a number from 2 to 6 inclusive, a dot again can match any character and the star *
modifies the dot so that an unlimited number of any character can be matched. Finally, the S
matches an S
and the $
ensures that this marks the end of the string being checked. We will handle the "it has a Z
character in it" criteria later.50k-users.txt
file against the regular expression we built using Python. We compile the regular expression and then use filter
to test it against every username. We then filter all the matches again by checking if they contain a Z
, thus fullying applying the challenge criteria. The final matching username is printed and is the flag.YXx52hsi3ZQ5b9rS