merrittr Posted October 23, 2014 Share Posted October 23, 2014 I have a xml string like this xmlDoc "<SupplMets TumorSupplementalId="272341"><SupplMet TumorSupplMetsId="109130" SiteOfMetastasis="C020" DateOfMetastasis="20010101" MetastasisIdType="" MetastasisEliminated="" MetastasisSD="02-003710[" /></SupplMets>" what i need to do is replace " with ' and then the remaining " with a blank xmlDoc = xmlDoc.replace(/"//g,/'/); gives me an error of 'g' is undefined any ideas? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 23, 2014 Share Posted October 23, 2014 You have an extra closing slash. You're telling it to divide the regular expression by the variable g. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now