i am parsing an RSS feed with PHP – and i the description/title contains several special characters such as below.
master French chef – to
How can i clean this out? – i looked at strip_tags, etc but that doesnt serve the purpose. Looked at php.net but did not find a good/equivalent of stripallspecialcharacters($string) — is there something like available in PHP? Thanks.
Look like Regex would be your best bet for this
Found this from this question previously asked
stackoverflow.com/questions/4651899/regex-to-reject-non-english-characters
But there is a problem with using regex it may work for most of your cases but then not for every so you might want to shop around for one that suites exactly what you want.