Mark S. Miller (2015-06-13T05:51:31.000Z)
d at domenic.me (2015-06-16T16:53:17.970Z)
Nice! Inspired ```js // Based on // https://github.com/benjamingr/RexExp.escape/blob/master/polyfill.js function re(template, ...subs) { const parts = []; const numSubs = subs.length; for (let i = 0; i < numSubs; i++) { parts.push(template.raw[i]); parts.push(subs[i].replace(/[\/\\^$*+?.()|[\]{}]/g, '\\$&')); } parts.push(template.raw[numSubs]); return RegExp(parts.join('')); } ```