js replace multiple
string.replace('find1', 'replace1').replace('find2', 'replace2');
js replace multiple
string.replace('find1', 'replace1').replace('find2', 'replace2');
jquery replace multiple words
// jQuery search and replace space in 10 digit phone number with dots (.)
(".some-class").each(function() {
var text = $(this).html();
// Start search at "Phone: " then 3 digits space 3 digits space 4 digits
// "Phone: 901 123 4567" -> "Phone: 901.123.4567"
text = text.replace(/Phone: (d{3}) (d{3}) (d{4})/, "Phone: $1.$2.$3");
$(this).html(text);
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us