I have a regular expression that replaces characters and numbers in a string. I use preg_replace and a regular expression of "/[a-z\d]/i" to do that.
$newtext= preg_replace("/[a-z\d]/i", "x", $originaltext);
Is there an easy way to extend that regex to include unicode characters?
Edited to...
Hello,
I was trying to today to test the (User Name Match Regular Expression) option on XF.
My forum is an Arabic one so I was trying to add a regex expression to allow the registration with Arabic letters only,
I used the following:
^[\u0621-\u064A]+$
Ref...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.