Posted by Balaras on 06/07/05 16:39
Hi,
Can sombody here please help me a bit with a regular expression.
I have a xml file where I need to strip the CDATA sections of any
contained data.
Eg.
<xml>
<tag><[CDATA[ some data ]]></tag>
<tag><[CDATA[ some more data ]]></tag>
</xml>
Should end up like this:
<xml>
<tag><[CDATA[]]></tag>
<tag><[CDATA[]]></tag>
</xml>
Now, I have the start and end of the range
(\[CDATA\[)
and
(\]\]>)
But I cannot figure out how I match any character that is not like the
end of the range.
That is > is ok, ] is ok
but ]]> is not ok.
Thanks in advance,
Balaras
[Back to original message]
|