I would like to check if the string stored in the variable, Username is stored in the following format:
"a.bcde" or "12a.bcde"
Before the full stop, there can be a single letter or two numbers and a letter.
After the full stop, there can only be letters.
Valid Strings: "a.bcdefghi","45z.yxwu"
Invalid Strings: "1a.bcdef","12a.bcde@"
I had written the following code
if bool(re.match("..[a-z][.][a-z]+", Username))==True:
return True
else:
return False
However, it returns False for "a.bcde" and True for "12a.bcde@fgh.com"