Archive for August 9, 2007

JavaScript to Replace Backslash

Posted in JavaScript, Regular Expressions, Software, Technology, programming on August 9, 2007 by Joey

Backslashes can be removed from a JavaScript string as follows:

var strBackslash = ‘\\backslash’;
var strReplace = strBackslash.replace(/\\/,”);
document.write(strReplace);

Related articles:
JavaScript Regular Expressions