I am a beginner, how do I combine them:
var mystring = "[email protected]";
document.write(mystring.replace(/@/, "&&"));
prints my.email&&computer.com
var mystring = "[email protected]";
document.write(mystring.replace(/\./, "##"));
prints my##[email protected]
I have two questions:
How do I make this regex (mystring.replace(/./, "##") to after @ change the dot to ## and how can I combine those two lines into one, and final read is:my.email&&computer##com
mystring.replace(/@/, "&&").replace(/\./, "##"):)my.email&&computer##cominstead ofmy##email&&computer##com?my.email&&computer##com