title: Regular Expression to Match Exact Character and Numbers
body: <p>I want to match a string that can be either <code>KH1</code> or <code>KH2</code> or ... <code>KH99</code>.</p>
  
  <p>I did,</p>
  
  <pre><code>public class Test1 {
  
  public static void main(String[] args) {
      String name = "KH1";
      if(name.matches("[[K][H][1-9][0-9]]") || name.matches("[[K][H][1-9]]")){
          System.out.println("VALID NAME");
      }else{
          System.out.println("INVALID NAME");
      }
   }
  }
  </code></pre>
  
  <p>It doesnot work. I get <code>INVALID NAME</code>.</p>
  
  <p>What is the correct way for this?</p>