diff --git a/jquery-emotions/jquery.emotions.js b/jquery-emotions/jquery.emotions.js index ed78c63..5603a12 100644 --- a/jquery-emotions/jquery.emotions.js +++ b/jquery-emotions/jquery.emotions.js @@ -83,8 +83,8 @@ if (pattern[0] === ';') { text = text - .replace(new RegExp("(^|\\W)" + $t.quote(pattern), "g"), "\\1" + rep) - .replace(new RegExp("(^|\\W)" + $t.quote(encPattent), "g"), "\\1" + rep); + .replace(new RegExp("(^|\\W)" + $t.quote(pattern), "g"), "$1" + rep) + .replace(new RegExp("(^|\\W)" + $t.quote(encPattent), "g"), "$1" + rep); } else { text = text .replace(new RegExp($t.quote(pattern), "g"), rep)