javascript string.replace question -
javascript string.replace question -
i know can this:
var str = "microsoft has largest capital reserves of tech company. microsoft located in california."; str = str.replace(/microsoft/gi, "apple");
and you'd following: apple has largest capital reserves of tech company. apple located in california.
how can utilize global case insensitive alter string 07/08/2011 07082011?
i tried variations of str.replace(///gi, "") no luck.
try this:
var input = "07/08/2011"; var output = input.replace(/\//g,""); //output 07082011
javascript replace global
Comments
Post a Comment