What is the regex expression for CDATA
问题 Hi I have an example CDATA here <![CDATA[asd[f]]]> and <tag1><![CDATA[asd[f]]]></tag1><tag2><![CDATA[asd[f]]]></tag2> The CDATA regex i have is not able to recognize this "<![CDATA["([^\]]|"]"[^\]]|"]]"[^>])*"]]>" this does not work too "<![CDATA["[^\]]*[\]]{2,}([^\]>][^\]]*[\]]{2,})*">" Will someone please give me a regex for <![CDATA[asd[f]]]> , I need to use it in Lex/Flex : I have answered this question, please vote on my answer, thanks. 回答1: Easy enough, it should be this: <!\[CDATA\[.*?