i have bulk of email address in textarea '[email protected]@[email protected]@[email protected]@hotmail.com'
what i want to do is add 'comma space' behind of .com / .com.my
expected result after onblur function in textarea: `[email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
what i have tried.
b = value.split('.com.my').join('.com.my, ');
b = value.split('.com').join('.com, ');
problem : it will replace all '.com' to '.com, ' even with '.com.my'