title: Regular expression is not working with single character
body: <p>I am trying to write regular expression in <code>Java</code> to evaluate two strings mentioned with () separated by , </p>
  
  <pre><code>Example: (test1,test2)
  </code></pre>
  
  <p>I have written below code</p>
  
  <pre><code>public static void main(String[] a){
      String pattern = "\\([a-zA-Z0-9]+,[a-zA-Z0-9]+.\\)";
      String test = "(test1,test2)";
      System.out.println(test.matches(pattern));
  }
  </code></pre>
  
  <p>It works as expected and prints <code>true</code> in below cases </p>
  
  <pre><code>String test = "(test1,test2)";
  
  String test = "(t,test2)";
  </code></pre>
  
  <p>But it is printing <code>false</code> when I send below </p>
  
  <pre><code>String test = "(test1,t)";
  </code></pre>
  
  <p>It is strange because I am using same expression before and after ,</p>
  
  <p>It returns <code>true</code> for <code>(t,test2)</code> but not for <code>(test1,t)</code></p>
  
  <p>Please let me know what am I missing in this regular expression. I need it to evaluate and return <code>true</code> for <code>(test1,t)</code> </p>