S
Shapper.
Hello,
I have the following:
var original = "<span>name at email dot com</span>"
var at = "at";
var dot = "dot";
email = original.text().replace(new RegExp(' ' + at + ' ', 'gi'), '@').replace(new RegExp(' ' + dot + ' ', 'gi'), '.');
I need to find the at and dot var values in original and replace by @ and .
And I need to be case insensitive. So could be AT.
Or any other thing like var at = "ATE".
My Regex expression is not replacing anything.
What am I doing wrong?
I have the following:
var original = "<span>name at email dot com</span>"
var at = "at";
var dot = "dot";
email = original.text().replace(new RegExp(' ' + at + ' ', 'gi'), '@').replace(new RegExp(' ' + dot + ' ', 'gi'), '.');
I need to find the at and dot var values in original and replace by @ and .
And I need to be case insensitive. So could be AT.
Or any other thing like var at = "ATE".
My Regex expression is not replacing anything.
What am I doing wrong?