I would like to ask how to remove a special character from a string(extracted from a scrapped page).
 4:30am
I just want to get the time so ive tried so filter it using this:
$str = 'Â 4:30am';
$new_string = preg_replace("[^A-Za-z0-9]", "", $str);
echo '<pre>'.$new_string.'</pre>';
But it doesn’t change 😐
Is there any solution/approach?
Your regex is invalid…
… and you forgot “:” in the regex, so in your case it will be removed.