• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Regular Expression Usernames

#1
I was wondering if someone could help me with the regular expression usernames. I only want to allow letters, numbers, and underscores. Any help would be greatly appreciated.
 

Brogan

XenForo moderator
Staff member
#2
Try this: ^[a-zA-Z0-9_]+$

I was almost there, just needed a bit of help from Mike (I omitted the [] and +$).