title: RegEx pattern to detect two consecutive numbers followed by at the most 9 characters?
body: <p>How can I create a regex that detects any string starting with two consecutive numbers followed by at the most nine consecutive characters with a hyphen symbol in java regex? For instance:</p>
  
  <pre><code>nnccccccccc-nnccccccccc
  </code></pre>
  
  <p>or</p>
  
  <pre><code>nncccccc-nnccccccccc
  </code></pre>
  
  <p>or</p>
  
  <pre><code>nnccccccc-nncccccccc
  </code></pre>
  
  <p>Where <code>n</code> represents a number from 0 to 1 and <code>c</code> a letter character. </p>
  
  <p>So far I tried this: <a href="https://regex101.com/r/a1eJvY/2" rel="nofollow noreferrer">https://regex101.com/r/a1eJvY/2</a>.</p>