I'm looking to use regex to try remove all non alpha-numeric characters from a string and replace spaces with a +
All I want to permit is basically alphabetical words A-Z and +
This is specifically to prepare the string to become a part of a URL, thus need the + symbols instead of spaces.
I have looked at /\W+/ however this removes all white spaces and alpha-numeric characters, whereas I want to leave the spaces in if possible to then be replaced by + symbols.
I've searched around a bit but I can't seem to find something, I was hoping someone might have any simple suggestions for this.
Sample string & Desired result:
Durarara!!x2 Ten -> durarara+x2+ten