fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var myResponse = @"<td colspan=""2"" class=""invalid"">
  9. 28 Errors, 3 warning(s)
  10.  
  11.  
  12. </td>";
  13. var TdTag = Regex.Matches(myResponse, @"(?s)<td[^<]*>\s*(\d+)[^<]*</td>");
  14. var result = TdTag[0].Groups[1].Value;
  15. Console.WriteLine(result);
  16. }
  17. }
Success #stdin #stdout 0.08s 24432KB
stdin
Standard input is empty
stdout
28