Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at Scotch On The Rocks (SOTR) 2011 (Edinburgh) with:

qwerty

Member since Jul 17, 2011

Recent Blog Comments By qwerty

  • Ask Ben: Javascript String Replace Method

    Posted on Jul 26, 2011 at 3:52 PM

    Here is what I'm getting from the following code: var str=" Hai'Hello"; document.write(str.replaceAll("'","\\\\'")); alert(str.replaceAll("'","\\\\'")); Output: Hai\\'Hello This is correct. The point of this function is to perform a replace... read more »

  • Ask Ben: Javascript String Replace Method

    Posted on Jul 17, 2011 at 1:01 PM

    tomy, if you want to replace a specific instance (2) in a string. Use this replaceAll function: http://www.dumpsite.com/replaceAll.php and then pass it a anonymous function for "str2" with the following wrapper function: function replaceInstance(str, str1, str2, instance, ignore) { ... read more »

  • Ask Ben: Javascript String Replace Method

    Posted on Jul 17, 2011 at 12:20 PM

    Try this replaceAll: http://www.dumpsite.com/replaceAll.php It is very fast, and it will work for ALL these conditions that many others fail on: "x".replaceAll("x", "xyz"); xyz "x".replaceAll("", "xyz"); xyzxxyz "aA".replace... read more »