title: How to match multiple strings using regular expression?
body: <p>I have a bunch of strings to match for Bonfire: Palindrome in FreeCodeCamp
  The strings are:</p>
  
  <ul>
  <li>eye</li>
  <li>racecar</li>
  <li>not a palindrome</li>
  <li>A man, a plan, a canal. Panama</li>
  <li>nope</li>
  <li>almostomla</li>
  <li>My age is 0, 0 si ega ym.</li>
  <li>1 eye for of 1 eye.</li>
  <li>0_0 (: /-\ :) 0-0</li>
  </ul>
  
  <p>My Code:</p>
  
  <pre><code>function palindrome(str) {
  
  
    var newstr = str.replace(/[^\w_-]/g,"").toLowerCase();
    var num = newstr.length;
    for(var i=0;i&lt;=Math.floor(num/2);i++)  
      {
        if(newstr[i]!==newstr[num-i])
          {
  
            return newstr;
  
         }
      }
  
    return true;
  }
  </code></pre>
  
  <p>What could be wrong in the if statement? the return of the string is alright.. Just can't wrap my head around these Regular expressions?</p>
  
  <p>My current regular expression:</p>
  
  <pre><code>var newstr = str.replace(/[^\w_-]/g,"").toLowerCase();
  </code></pre>
  
  <p>matches almost all the strings but the last one. Where am I going wrong?</p>