A little hand with str.replace()?

function palindrome(str) {
  // Good luck!
 var re=",+-#!¡¿?$%i."/gi/
 var newString= str.replace(re," ");

return re;

Okk,so this is what I´ve done so far. I´m trying to replace those symbols put together in a chunk with blank space,so that instead of “Je,su.s” it would be “Jesus”.Thanks for reading

There are “tokens” in regex which represent things like “any digit” or “any non-word character” I recommend looking into these so that you don’t have to list every single special character that you can think of.
https://regex101.com/ is a great place to test regex and also has a good explanation of your pattern and a place to look at available tokens.

1 Like

Hey Ariel,thank you for the link. I´ll check it out. I think I wouldn´t have figured it out myself