Regex for Names where the middle and last names are optional. (Python)
<p>I am trying to match space seperated names that do not contain any special character.
The first name is compulsory and the middle and last names are optional. 
Also, the names could have all capital letters, but not all small, and the first character of each of the names(first, middle, last) is a capital letter.</p>

<p>I am using the following regex, but it doesn't seem to work :</p>

<p>"[A-Z]\w+\s(?:[A-Z]\w+?:)?\s(?:[A-Z]\w+?:)?"</p>

<p><strong>Edit :</strong> This works like a gem :
 "[A-Z]\w+(?:\s[A-Z](\w+)?)?(?:\s[A-Z](\w+)?)?"</p>