Let's say I have a string 'Hello_World'
.
How do I remove '_'
from the string for it to be 'Hello World'
?
I have seen various trim examples like the following from w3schools:
function myTrim(x) {
return x.replace(/^\s+|\s+$/gm,'');
}
to remove whitespaces from a string. I dont know how to remove an underscore using the same methodology.