I am creating a web app that will have twitch login support. Users can also create an account on their own with username, email, etc. I would love it if I could get the regex you are using to validate usernames on Twitch so I can make mine match. It would seem strange if a char was allowed in a twitch created account, but not on an account created via email signup. I just want some continuity between the different account types.
A-Z 0-9 and _ are the allowed characters in a username.
I can confirm that a username cannot start with an underscore. They also cannot contain ‘bad words,’ although I’m not sure if there’s a list somewhere of all the words Twitch sees as bad.
Keep in mind those criteria are only suggested, and that there are names that go outside of them. Usually those are really old usernames, or they are created by Twitch. Usernames can also contain ‘bad words’ if they were added before the ‘bad words’ were.