title: What is the regex expression for CDATA
body: <p>Hi I have an example CDATA here</p>
  
  <pre><code>&lt;![CDATA[asd[f]]]&gt;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>&lt;tag1&gt;&lt;![CDATA[asd[f]]]&gt;&lt;/tag1&gt;&lt;tag2&gt;&lt;![CDATA[asd[f]]]&gt;&lt;/tag2&gt;
  </code></pre>
  
  <p>The CDATA regex i have is not able to recognize this</p>
  
  <pre><code>"&lt;![CDATA["([^\]]|"]"[^\]]|"]]"[^&gt;])*"]]&gt;"
  </code></pre>
  
  <p>this does not work too</p>
  
  <pre><code>"&lt;![CDATA["[^\]]*[\]]{2,}([^\]&gt;][^\]]*[\]]{2,})*"&gt;"
  </code></pre>
  
  <p>Will someone please give me a regex for <code>&lt;![CDATA[asd[f]]]&gt;</code>, I need to use it in Lex/Flex</p>
  
  <p> : I have answered this question, please vote on my answer, thanks.</p>