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 the New York ColdFusion User Group (Feb. 2008) with:

Wize

Member since Mar 21, 2010

Recent Blog Comments By Wize

  • Ask Ben: Javascript String Replace Method

    Posted on Jun 26, 2010 at 3:52 PM

    @John, Try this: var line = "a text includes this in it"; var srchtxt = "in"; var re = new RegExp("\\b"+srchtxt+"\\b", "gi"); newLine = line.replace(re,"out"); document.write(newLine); //output: a text includes this out it... read more »

  • Ask Ben: Javascript String Replace Method

    Posted on Mar 26, 2010 at 1:22 AM

    This would be a simpler test. Change: abc Abc "abc" ABC to: def Def "abc" DEF Change "abc" to "def", preserve case, but don't change anything in double quotes. What would be the expression to do that? Thanks.... read more »

  • Ask Ben: Javascript String Replace Method

    Posted on Mar 25, 2010 at 12:39 AM

    I want to change all occurrences of "we" to "they" in the sentence below, but I do not want to change anything within double or single quotes. I also want to keep the case that is used. I believe I need to use look ahead, but I haven't used look ahead that much so I'm not sure how to do it. I'm also... read more »

  • Ask Ben: Javascript String Replace Method

    Posted on Mar 21, 2010 at 3:49 PM

    I'm confused a bit by what you are asking, but if had this sentence: The color, red, is in the style statement; style: red;. and wanted to remove all or change all of the commas, colons, and semi-colons, my expression would be: [,:;] The result would look like this: The color red is in the styl... read more »