Regex for usernames in registration form.

Nasr

Well-known member
How do I exclude certain characters in usernames on registeration form? I want to prevent users from using numbers and english letters since my forum is in Arabic... how do i do that?
 

Jake Bunce

XenForo moderator
Staff member
Admin CP -> Home -> Options -> Users and Registration -> User Name Match Regular Expression

This regex should do what you want. I tested it and it appears to work.

Code:
^[^a-zA-Z0-9]+$
 

Stuart Wright

Well-known member
Could I also request some regext help please?
We need the opposite. Letters, numbers, spaces and dashes only.
Thanks
 
Top