title: Regular Expression to find "lastname, firstname middlename" format
body: <p>I am trying to find the format "abc, def g" which is a name format "lastname, firstname middlename". I think the best suited method is regex but I do not have any idea in Regex. I tried doing some learning in regex and tried some expression also but no luck. One additional point there may be more than one spaces between the words.</p>
  
  <p>This is what I tried. But this is not working.</p>
  
  <pre><code>(([A-Z][,]\s?)*([A-Z][a-z]+\s?)+([A-Z]\s?[a-z]*)*)
  </code></pre>
  
  <p>Need help ! Any idea how I can do this so that only the above expression match.</p>
  
  <p>Thanks !</p>
  
  <p><strong>ANSWER</strong></p>
  
  <p>Finally I am using </p>
  
  <pre><code>([A-Za-z]+),\\s*([A-Za-z]+)\\s*([A-Za-z]+)
  </code></pre>
  
  <p>Thanks to everyone for the suggestions.</p>