First off, I’m a javascript noob and know nearly nothing of regex. I’m trying to hack together something that would essentially change this:
<span class="fspoiler">spoils</span>
To this:
<spoiler>spoils</spoiler>
From some research, it would seem that using Regex and the replace() function are the way to go, but I don’t where to start.
1 Answer