I need a regex that would test if a word is composed of letters (alpha characters), white spaces, and periods (.). I need this to use for validating names that is entered in my database.
This is what I currently use:
preg_match('/^[\pL\s]+$/u',$foo)
It works fine for checking alpha characters and whitespaces, but rejects names with periods as well. I hope you guys can help as I have no idea how to use regex.