title: RegExp Test with two variables : possible ?
body: <p>I'm trying to use the Test() Method like I did here : </p>
  
  <pre><code>var namealbum = data.data[i].name;
  var text = namealbum;
  
  if (/les comics d/i.test(text) == false) {
              //do nothing
          } else {
  
          var albumid = data.data[i].id;
              $('body').append('&lt;section id="album album'+j+'"&gt;&lt;h2 id="album_title"&gt;'+text+'&lt;/h2&gt;&lt;div id="images"&gt;&lt;/div&gt;&lt;/section&gt;');
  </code></pre>
  
  <p>But I wonder if it's possible to use this method with two variables.</p>
  
  <p>Kind of like this : </p>
  
  <pre><code>var comicname = photos.data[i].name;
  var comicpicture= photos.data[i].source;
  var comiclink = photos.data[i].link;
  
  
      if (albumid.test(comiclink) == false){
      }else {
        $('#images').append('&lt;img src="'+comicpicture+'"/&gt;');
      };
  </code></pre>
  
  <p>Actually, I want to test if there is the content of the variable <em>albumid</em> (which is the ID of an album) in the link of a photograph stored in the variable <em>comiclink</em>. </p>
  
  <p>I hope you guys will understand my bad english.</p>
  
  <p>Thank you though !</p>