-4

I have a string that looks like KATIE+DAMAN-SUZANNE+DANIELS

How do I replace both + signs? I tried the following which does not work.

string.replace(/+/g, ' ');
Linx
  • 753
  • 3
  • 15
  • 34

1 Answers1

0
string.replace(/[^a-zA-Z ]/g,'')

You have tried this it's working

Jay Parmar
  • 368
  • 2
  • 9