I would start by listing the rules that define a valid name. Just in plain English. I suspect you will end up with a very complex set of rules and exceptions. Once you have guessed that you are leaving, you will be ready to write regular expressions to match them.
source
share