You could use something like this. If there are only a few characters you are concerned about, you could use a str_replace for each one e.g.
$metastring = str_replace("'", '', $metastring);
$metastring = str_replace("&", '', $metastring);
Otherwise use a preg_replace with Regex like this which would remove all characters except letters, numbers, periods and hyphens
$newmetastring = preg_replace('/[^A-Za-z0-9\s.\s-]/','',$metastring);