title: Regular Expression (case insensitive) on a Variable in an If - JS/Angular
body: <p>I am trying to find <code>if</code> a <code>value</code> stored in dynamic <code>variable</code> is inside of an <code>array</code> while ignoring <strong>case</strong> and not using to <code>.toLowerCase()</code> or upper.</p>
  
  <p>What I have that works is:</p>
  
  <pre><code>if ($scope.favoriteItems.indexOf(item.name.toLowerCase()) === -1) {
  </code></pre>
  
  <p>I want something like using regex <code>if (item.name 'no matter case is in $scope.favoriteItems)</code></p>