php regular expression for unicode
I have some text where unicode is written as text l开发者_JAVA百科ike this
There areu25ba 2 boys.
it should be like this
There are► 2 boys.
Replace 'u' with '&#x' if there is unicode character.
Thanks in advance
A naive way would be:
preg_replace('/u([0-9a-fA-F]{4})/','&#x$1;',$string);
But I doubt 'udaff' would appreciate it.
精彩评论