fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string str = "1) chicken burger </br> 2)Chips </br> 3) xyz </br>";
  9. string result = Regex.Replace(str, @"^\d+\)\s*|\s*<[^<>]*>$|\d+\)|<[^<>]*>", "");
  10. string ou = Regex.Replace(result, @"\s{2,}", ",");
  11. Console.WriteLine(ou);
  12. Console.ReadLine();
  13. }
  14. }
Success #stdin #stdout 0.07s 33952KB
stdin
Standard input is empty
stdout
chicken burger,Chips,xyz