title: Regex for parsing names where last name has a prefix
body: <p>I am learning regular expressions (c#) working in RegexBuddy (love it). I have been to trying to parse names with a very specific pattern. I know it cannot be made perfect, but I think am very close to what I want to accomplish.</p>
  
  <p><strong>Assumptions</strong>: </p>
  
  <ol>
  
  <li>
  the name pattern is FIRST [MIDDLE] LAST, all caps, where MIDDLE is optional and there is NO title or suffix
  </li>
  
  <li>
  I want to capture FIRST and MIDDLE to into a firstname value, and LAST into a lastname value
  </li>
  
  <li>
  FIRST and MIDDLE together may have any number of words
  </li>
  
  <li>
  I know that I cannot match multiple-word last names (which I am okay with) EXCEPT in 2 cases:
  <ul>
  <li>
  hyphenated last names
  </li>
  <li>
  names in which a last name has a prefix ("EL GHAMRY SABE", "DE AMORIM SILVA", "DE LA HOYA" are actual examples from my data)
  </li>
  </ul>
  
  </li>
  </ol>
  
  <p><strong>Here is my regex so far</strong> (using a few of the last-name prefixes):</p>
  
  <pre><code>^(?&lt;first&gt;[ A-Z]+?) (?&lt;last&gt;(?&lt;pfx&gt;(?:(?:EL|DE|LA) )*)[A-Z\-]+?)$
  </code></pre>
  
  <p>Which works well (capturing first, last and last-name-prefix) with:</p>
  
  <pre><code>JOHN SMITH
  JOHN JAY SMITH
  JOHN JAYEL SMITH
  JOHN JAY SMITH-JONES
  JOHN JAY JIMMY SMITH JONES  -- only "JONES" is in the last name, which is okay for this exercise
  JOHN JAY EL AMIN
  JOHN JAY DE LA HOYA  -- "DE LA HOYA" is the last name
  JOHN JAY EL  -- a case where "EL" is actually the last name
  JOHN EL AMIN
  </code></pre>
  
  <p>But fails on these two which have multi-part last names following the last name prefix (only the last word is captured in the lastname field):</p>
  
  <pre><code>JOHN JAY EL GHAMRY SABE
  CICERO JOSE TORRES DE AMORIM SILVA
  </code></pre>
  
  <p>SO... <strong>2 questions</strong>:</p>
  
  <ol>
  <li>
  How do I alter my expression so that IF there is a last name prefix that everything including and after the prefix ("EL","DE","LE", "DE LA", etc.) are included in the lastname field, and IF there is NO prefix, only the last word is included in the lastname field?
  </li>
  <li>
  As I am still learning, can you suggest other improvements to my regex?
  </li>
  </ol>