I want to remove special characters from a string and replace them with the _ character.
_
For example:
string = \"img_realtime_tr~ading3$
string = string.replace(/[\W_]/g, "_");