If I do, preg_replace(‘/[^a-zA-Z0-9\s-_]/’,”,$val) in a multi-lingual application, will it handle things like accented characters or russian characters? If not, how can I filter user input to only allow the above characters but with locale awareness?
thanks!
codecowboy.
The only useful information I can find is from this page of the manual, which states :
Still, I wouldn’t bet that it’s working as you want…
But, to be sure :
About unicode, the manual says this :
So, it might be a safer solution… curious about it, should I add ^^