replace all special character in string javascript....? -


why not replace ?

code:

   var str = "fq$team$456$$$$fq$plrs$4789";     if(str.indexof("$$$$")>=0){         str = str.replace("$$$$","$$");     }     // gives fq$team$456$fq$plrs$4789      // expected output = fq$team$456$$fq$plrs$4789  

according mdn docs, $$ supposed insert single $. result of $ character being used form special string patterns.


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -