title: Java using regex to verify an input string
body: <p>g.:</p>
  
  <pre><code>String string="Marc Louie, Garduque Bautista";
  </code></pre>
  
  <p>I want to check if a string contains only words, a comma and spaces. i have tried to use regex and the closest I got is this :</p>
  
  <pre><code>String pattern = "[a-zA-Z]+(\\s[a-zA-Z]+)+";
  </code></pre>
  
  <p>but it doesnt check if there is a comma in there or not. Any suggestion ?</p>