The expression to process your example will be
\<\!\[CDATA\[(?<text>[^\]]*)\]\]\>
If the group "text" will contain your HTML.
C # code you need:
using System.Text.RegularExpressions;
RegexOptions options = RegexOptions.None;
Regex regex = new Regex(@"\<\!\[CDATA\[(?<text>[^\]]*)\]\]\>", options);
string input = @"<![CDATA[<table><tr><td>Approved</td></tr></table>]]>";
bool isMatch = regex.IsMatch(input);
if( isMatch )
Match match = regex.Match(input);
string HTMLtext = match.Groups["text"].Value;
end if
The variable "input" is here to use the input pattern you entered.
source
share