I need a javascript regular expression to match twitter usernames.
The username is entered by the user while signing up, so I don\'t want to distract them with too m
To exclude "non-latin" characters, you have to use: ^@?([a-zA-Z0-9_]){1,15}$. Because, \w accepts "any word characters". And non-latin characters qualifies this condition. So, it matches even üö like Turkish characters as well.
^@?([a-zA-Z0-9_]){1,15}$
\w
üö