Hi fellows,
I was given a task to strip unnecessary characters out of a article compilation. The compilation being few gigs means a lot of work.
I am using the following code to rip the characters
$thetext=preg_replace('/([\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xc2])/e', "_" , $thetext);
I am not using the 'only allow' mechanism because the books contain iso-8859-1 chars which implies that it can have like so many other characters that I will have to personally include to allow!
Anyways
this code
$thetext=preg_replace('/([\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xc2])/e', "_" , $thetext);
kinda kills the cpu, it is very resource intensive. So, my question being, IS THERE A better way of doing this pleaseeee?