title: javascript check if regex apply
body: <p>First of all, here is my code snippet:</p>
  
  <pre><code>var str = '&lt;!--:de--&gt;some german text&lt;!--:--&gt;&lt;!--:en--&gt;some english text&lt;!--:--&gt;';
  var match =  str.match(/de--&gt;([^&lt;]+).+?en[^&gt;]+&gt;([^&lt;]+)/i);
  var textInDe = match[1]; 
  var textInEn = match[2];
  </code></pre>
  
  <p>I've got this regex validation (thanks to The Mask) which works great.</p>
  
  <p>Now, I want to check with an if-statement if this regex applies to some string or not. 
  I'm using Javascript jquery.</p>
  
  <p>Thanks in advance :)</p>