Hi,
Based on your requirements: “f.lastname”, your regex, while allowing this kind of user name does not look completely correct if you only want to allow that format.
With this one you allow 0 or more alphabetical letter followed by one character that can be anything and then again 0 or more alphabetical characters. Which means that usernames like “0” or “?asdf” would match.
In its python form, this one is closer to your format:
r"^[A-Za-z]\.[A-Za-z]+$"
One letter followed by a point followed by one or more letters.
If your usernames are only lowercase:
r"^[a-z]\.[a-z]+$"