Community Member Profile
- Profile: /members/8639-qwerty.htm
- Comments: 3
- Points: 28
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... 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&qu... 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&q... read more »



