johnnyg24 Posted January 7, 2010 Share Posted January 7, 2010 I have a string that contains the literal "\" character. When I try and preform string.replace("\","<br />"), it doesn't work for obvious reasons. Is there a way around this?Solved: string.replace(/\\/g,"<br />") Link to comment Share on other sites More sharing options...
Synook Posted January 8, 2010 Share Posted January 8, 2010 You could also have just escaped it within the string: string.replace("\\","<br />"); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.