Possible Duplicate:
Regex to validate names
I am developing a site.In that i want to validate the users name that is their first name and last name.Names will also contain letters like ó
I now validate using
if(!preg_match("/[a-zA-Z]+$/",$value))
{
echo "Invalid characters";
}
How do i validate the special characters? Friends i meant special characters like ó . I want this available in the name . But take off the letters like @,#,$
My name is J@k Ca$h
`. (Odds aren't too unfavourable that a rapper somewhere really is using that name). – Quentin Nov 28 '12 at 13:57