Title |
Test
Find
Pattern Title
|
Expression |
<!\[CDATA\[([^\]]*)\]\]> |
Description |
for getting cdata from and xml document.
cdata returns in $1.
it's not perfect as you can see from the non-matching examples. improvements needed - but this works for most scenario's.
|
Matches |
<![CDATA[ gobbledy gook ]]> | <![CDATA[ gobbledy & more gook ]]> |
Non-Matches |
<![CDATA[ gobbledy ] gook ]]> | <![CDATA[ gobbledy ]] gook ]]> |
Author |
Rating:
dave krause
|
Source |
|
Your Rating |
|
Title: Improvement suggestion
Name: Dima M.
Date: 5/13/2010 10:35:00 AM
Comment:
Hi,
I know that this solution is with the help of using of lookaround and lookbehind, and it's more processor consuming, but it allows usage of all signs (including ']') in the CDATA content.
(?<=<!\[CDATA\[)(.*?)(?=\]\]>)