CtrlAltDl
asked on
Strip non-alphanumeric except spanish characters.
I'm currently strip all non-alphanumeric characters from a string in PHP like this:
preg_replace("/\W/","",$st rText)
I'd like to change it so it doesn't strip spanish characters.
FYI, my server's locale is english-us.
The spanish characters I don't want to strip include:
[ÁáÉéÍíÑñÓóÚúÜü«»¿¡€P]
In hexadecimal they'd be:
[\xC1\xE1\xC9\xE9\xCD\xED\ xD1\xF1\xD 3\xF3\xDA\ xFA\xDC\xF C\xAB\xBB\ xBF\xA1\x8 0\x20A7]
preg_replace("/\W/","",$st
I'd like to change it so it doesn't strip spanish characters.
FYI, my server's locale is english-us.
The spanish characters I don't want to strip include:
[ÁáÉéÍíÑñÓóÚúÜü«»¿¡€P]
In hexadecimal they'd be:
[\xC1\xE1\xC9\xE9\xCD\xED\
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Unfortunately I still haven't tested it thoroughly, but I didn't want to leave this question open any longer. Thanks for your response!
ASKER