I get a XML from a third-party service,
This one is malformed sometimes CDATA tag aren’t close,
My goal is to write a regex capable of catching only malformed CDATA,
example :
</Couleur_regroupement>
<![CDATA[Rose;Jaune
</Couleur_regroupement>
<Dessus_Tige>
<![CDATA[26]]>
</Dessus_Tige>
For now I have this one :
((<{1}[a-zA-Z-]>{1}){1}(<![CDATA[){1}((?!]]>).)((</){1}[a-zA-Z-]*>{1}){1})
Which is working on the first example but not on the second…
It’s a false positive if html inside CDATA…
<Desart>
<![CDATA[Title<br><img src=img.jpg> blabla <i>bla</i> blabla<br><img src=img.jpg></br>
]]>
<Desart>