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 &quot;gunmetal&quot; color finish." size="3.7&quot;"/> 

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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -