Hi,
I am trying to detect and filter this chars but I still didn't find the solution :-(
Could anybody help ?
The code I am using is:
$find = array("/((\w|[é])+)(\s*)(,|.)/", "/((\w|[é])+),{1})((\w|[é])+)/", "/(!{1}|\?{1}|.{1})((\w|[é])+)/");
$change_with = array("\1\3", "\1 \2", "\1 \2");
echo preg_replace($find , $change_with, $text_box);
What I want to get is:
hallo...my name is,peter --> hallo... my name is, peter
(add spaces after .)
hallo!Welcome --> hallo! Welcome
(add space after !)
hallo ,world --> hallo, world
(move spaces)
perchè,così --> perchè, così
(add space after comma detecting 'è' char also)
\w seems not to include such chars, I am testing on PHP 4.2
Thank you very much