In username – I want to only allow alphanumeric characters and 10 other UTF8 characters that I want. What would be a proper way to do this? Would UTF8 be a problem with preg functions and do I need to use another method?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I recently asked how to make this Just Do The Right Thing, and learned that it’s rather prickly to get everything quite right.
If you can’t get
/\w/uto work right for you on Unicode, it is mostly like/[\pL\pM\p{Nd}\p{Nl}\p{Pc}]/u.