Javascript Code Use Variable in Replace() Function
How to Use a Variable Instead of a String in Javascripts Replace Function. When Using a Variable with the JS Replace Function you can Still Specify Global Replace /g and Case Insensitive /gi
Regex to the rescue when wanting to use Javascripts replace() function using variable instead of a pre known string value.