176
rated 0 times
[
178]
[
2]
/ answers: 1 / hits: 31699
/ 9 Years ago, fri, january 8, 2016, 12:00:00
Like the title says, i would like to remove an underscore within a String with a regex. This is what i have:
function palindrome(str) {
str = str.toLowerCase().replace(/[^a-zA-Z]/g, '',/s/g, '',/[0-9]/g,'');
if (str.split().reverse().join() !== str) {
return false;
}
else {
return true;
}
}
palindrome(eye);
More From » regex