Hacker News new | ask | show | jobs
by minitech 2451 days ago
Now it doesn’t work if the string you want to replace has any regex special characters. One JS idiom for replace-all is

  str.split(before).join(after)