preg_match_all help
Posted: Sun Jan 03, 2010 12:18 am
Can anyone help me regarding this preg_match_all I did.
This works fine however it won't allow the characters / () slash and open&close parentheses. I need those characters to be valid.
Thank you.
Code: Select all
if(preg_match_all('/[^a-z0-9\.,$ñ\s-_]/i', $vesselname, $invalid))
{
$errors[] = "Vessel name contains invalid character: " . join('',array_unique($invalid[0]));
}
Thank you.