D destring New member Nov 29, 2010 #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.
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.
Paul B XenForo moderator Staff member Nov 29, 2010 #2 Try this: ^[a-zA-Z0-9_]+$ I was almost there, just needed a bit of help from Mike (I omitted the [] and +$). Upvote 0 Downvote
Try this: ^[a-zA-Z0-9_]+$ I was almost there, just needed a bit of help from Mike (I omitted the [] and +$).
A Andy.N Well-known member Mar 4, 2011 #4 Brogan said: Try this: ^[a-zA-Z0-9_]+$ I was almost there, just needed a bit of help from Mike (I omitted the [] and +$). Click to expand... If I allow only letters, period (.), space, underscore and -, then what would that be? Upvote 0 Downvote
Brogan said: Try this: ^[a-zA-Z0-9_]+$ I was almost there, just needed a bit of help from Mike (I omitted the [] and +$). Click to expand... If I allow only letters, period (.), space, underscore and -, then what would that be?
Mike XenForo developer Staff member Mar 4, 2011 #5 Andy.N said: If I allow only letters, period (.), space, underscore and -, then what would that be? Click to expand... I'm not checking this, but... ^[a-zA-Z. _-]+$ Upvote 0 Downvote
Andy.N said: If I allow only letters, period (.), space, underscore and -, then what would that be? Click to expand... I'm not checking this, but... ^[a-zA-Z. _-]+$