Username regex for api?

A while ago, I made my own regex to validate usernames for my chat bot. I came up with this pattern:

[1][\w]{3,24}$

Why “[a-zA-Z0-9]” at the beginning? Because it seems like an underscore isn’t allowed as first character (can someone confirm this?)


  1. a-zA-Z0-9 ↩︎