title: How to generate a regex code for string like this "12A13":
body: <p>I have a query like need to generatre a regex for the String like "12A15" or "12a15".here it has 3 componeners [1-9 max length will be 2][only d or D][1-9 lmax length will be 2] .</p>
  
  <p>I have written Regex to validate a string but still its not able to validate give numbers:</p>
  
  <pre><code>(^[1-9]{1,2}[{d,D}][{4,6,8,10,12,20}]{1,2})+(\s?(\+|\-)\s?)([1-9]{1,2}([{d,D}][{4,6,8,10,12,20}]{1,2}))$
  </code></pre>
  
  <p>Here, in the regular expression, I am validating a string <code>12D22 +3d20</code>. It's telling it is matched, but it should not because <code>22</code> is not there in the list. In a valid <code>5D20+5d12</code> string, <code>12</code> and <code>20</code> could be any number from the <code>4</code>, <code>6</code>, <code>8</code>, <code>12</code>, <code>20</code> list.</p>