Skip to content

Commit

Permalink
samgozman#30 fix word parts replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrigus committed Dec 7, 2016
1 parent b441cc8 commit 352f98d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/yoptascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ var dictionary = [
];

function escapeRegExp(str) {
return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
return "\\b" + str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&') + "\\b";
}

function yoptReplaceAll(str, search, replacement) {
Expand Down

0 comments on commit 352f98d

Please sign in to comment.