K
Karch
If you run this:
string result = "<html><head></head><body>The body</body></html>";
result = retainBody.Replace(result, "$1");
With the following Regex:
private static readonly Regex retainBody = new
Regex(@"<\s*body[^>]*>(.*)<[\s/]*body[^>]*>", RegexOptions.Compiled |
RegexOptions.IgnoreCase | RegexOptions.Singleline);
You get this as the return:
<html><head></head>The body</html>
I want this instead:
The body
string result = "<html><head></head><body>The body</body></html>";
result = retainBody.Replace(result, "$1");
With the following Regex:
private static readonly Regex retainBody = new
Regex(@"<\s*body[^>]*>(.*)<[\s/]*body[^>]*>", RegexOptions.Compiled |
RegexOptions.IgnoreCase | RegexOptions.Singleline);
You get this as the return:
<html><head></head>The body</html>
I want this instead:
The body