title: Reg Expression Error after combining
body: <blockquote>
    <p>Format:</p>
    
    <p>TB-String1-String2-Year-NumericData1-NumericData1DigitAlways</p>
  </blockquote>
  
  <p>Examples as per the above format.</p>
  
  <p>TB-testdata1-testData2-2015-65789-3</p>
  
  <p>This is what I have tried so for</p>
  
  <pre><code>    var result = Regex.Match(testData, @"\T\B-\S{2,5}\-\S{2,5}\-[\d{4}]\-\^[0-9]+$\-[\d]");
  
          if (result.Success)
          {
                Return match;
           Else
           {
              Return noMatch;
           }
  </code></pre>
  
  <p>It is throwing invalid argument exception.</p>
  
  <p>Here is the requirement.</p>
  
  <p>First two letters are always “TB”. Not Case sensitive.</p>
  
  <p>Each items above are separated by “-”.</p>
  
  <p>String1 --> any characters from a to z. Not case sensitive. Should be between 2 to 5 characters.</p>
  
  <p>String2 --> any characters from a to z. Not case sensitive. Should be between 2 to 5 characters</p>
  
  <p>Year --> always it should be 4 characters numeric data. It is year data. So it should be +ve numbers only.</p>
  
  <p>NumericData1 --> Positive Numeric data only. Should be between 2 to 10 characters.</p>
  
  <p>NumericData1DigitAlways --> Always 1 digit numeric data between 0 to 8 only.</p>
  
  <p>I have tried each parts individually. It breaks when I concatenate the expression together.</p>
  
  <p>Thank you for your help.</p>