Not working to my code on palindrome

Tell us what’s happening:

palindrome("1 eye for of 1 eye.") should return false. not working

Your code so far
function palindrome(str) {
var reg =/\s|,|.|_|-|\d|A|\W/;
let newstring =str.slice().toLowerCase().split(’’).filter(x=>!reg.test(x+x));
let newstringre = newstring.slice().reverse().join("").toLowerCase();;
if(newstringre==newstring.join("")){
return true //newstringre+" " +newstring.join("");
}
return false
}


function palindrome(str) {
var reg =/\s|,|\.|_|-|\d|A|\W/;
let newstring =str.slice().toLowerCase().split('').filter(x=>!reg.test(x+x));
let newstringre = newstring.slice().reverse().join("").toLowerCase();;
if(newstringre==newstring.join("")){
return true //newstringre+" " +newstring.join("");
}
return false
}



console.log(palindrome("1 eye for of 1 eye"));

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36.

Challenge: Palindrome Checker

Link to the challenge:

Can you explain how think your comparison is generating the result you want?

There are a few issues here, but with respect to the characters you’re filtering out, look a bit more carefully at the description:

You’ll need to remove all non-alphanumeric characters (punctuation, spaces and symbols)