Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
Ben Nadel at cf.Objective() 2011 (Minneapolis, MN) with: Karsten Pearce
Ben Nadel at cf.Objective() 2011 (Minneapolis, MN) with: Karsten Pearce@vexeddeveloper )

Arthur

Member since May 5, 2016

Recent Blog Comments By Arthur

  • Cloning RegExp (Regular Expression) Objects In JavaScript

    Posted on May 5, 2016 at 8:10 PM

    Cloning the regular expressions in JavaScript: ``` var regex=/.*/g, clone; // Easy way clone=RegExp(regex.source,regex.flags); // Additional way to add/replace flags clone=RegExp(regex.source, [].unique.call(regex.flags+'gi').join('')); console.log(regex, clone); ```... read more »