Palindrome Checker...stumped

Ok I’m stumped
My code is comparable to the Intermediate solution but I’m still not passing several of the tests
I’d appreciate any help to point me in the right direction

https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker

function palindrome(str) {
  var regEx = /\s\W_/g;
  var newStr = str.toLowerCase().replace(regEx, "");

  for (var i = 0; i < newStr.length/2; i++){
    if (newStr[i] !== newStr[newStr.length - 1 - i]){
      return false;
    }
  }
  console.log(newStr);

  // Good luck!
  return true;
}
palindrome("eye");

The regex is not the same as any of the solutions, they are all using something you are not using. If you have looked at the solutions, look again and check your regex against them.

Yes that was the problem I missed the square brackets

Thanks for the tip, adding in the square brackets solved the problem so the regEx should match spaces and non-word characters…

Also thanks for the edits