xml - Sublime Text: Find all quotes(") inside double quotes using regex -
i have huge xml document want replace double quotes ("
) html entity "
inside double quotes, think can done using regular expressions in sublime text don't know can regular expression that!
xml example:
<itemdescription descriptionvalue="rectangular cocktail table" itemdescriptionqualifier="sellerassigned" itemdescriptionclassification="product" itemfriendlydescription="rectangular cocktail table" itemfeatures="welded metal frames in baked epoxy "gunmetal" color finish." size="3.7""/>
what want achieve is:
<itemdescription descriptionvalue="rectangular cocktail table" itemdescriptionqualifier="sellerassigned" itemdescriptionclassification="product" itemfriendlydescription="rectangular cocktail table" itemfeatures="welded metal frames in baked epoxy "gunmetal" color finish." size="3.7""/>
thanks
it's better not describe xml document, or standard answer shouldn't process xml using regular expressions, should use xml parser. however, reason doing exercise not xml document, , want turn one.
this isn't going easy. proposal of replacing " if occurs between double quotes unworkable: quotes replace in text
abc="foo="bar" baz=" and="or""
there no unique way of interpreting this, why xml has rule in first place.
you've been given pig in poke. don't accept it. it's garbage. tell originator fix it. xml has grammar rules reason.
Comments
Post a Comment