http://qs1969.pair.com?node_id=588095

brickwall has asked for the wisdom of the Perl Monks concerning the following question:

Hello, Hope someone can help. I need to find a regex to take a surname (any surname) from a form with <STDIN>, It must take "double-barrel" names into account (ie those with a space in the middle), but the whole string must be no longer than 20 characters. It must start with a letter and end with a letter with the space (or no space) appearing somewhere in the middle. It must also cater for normal single word surnames. This is what i have so far (but doesnt limit to 20 characters)
m/^([a-zA-Z]\s?[a-zA-Z]?){1,20}$/
I bet this is simple but for the life of me i cant figure out the regex i need. TIA