i have a simple regex expression below to pull out the value within a string that is surrounded by end**end, example below. However, although it’s stupidly simple im struggling to get the results I need! Is there something obvious I’m missing!
Many thanks as always.
var str = "endhelloend";
var match = Regex.Match(str, @"end([a-z]+)end$", RegexOptions.IgnoreCase);
if(match.Success)
{
result = match.Groups[0].Value // should return 'hello'
}
Use solution 1 to extract .html text content and then filter your desired text from text by using solution 2.
To clean html elements within .htm file, try this:
Regex to filter text “endhelloend” to obtain “hello”
