Use str_replace instead of preg_match