I have the following HTML code:
106.2%
Which I get the number through two phases:
R
string html = @"106.4% 106.2% "; string patten = @".*(?<=>)(.+?)(?=).*?"; foreach (Match match in Regex.Matches(html, patten)) { Console.WriteLine(match.Groups[1].Value); }
I have changed the regex as your wish, The output is
106.4% 106.2%