fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string input = @"this is <tag1 attribute=""0""> and ends with </tag>, okay?";
  9. Console.WriteLine(input);
  10. Match match = Regex.Match(input, @"<tag1 attribute=""0"">.*?<\/tag>",
  11. RegexOptions.IgnoreCase);
  12. if (match.Success)
  13. {
  14. Console.WriteLine("Match!");
  15. }
  16. }
  17. }
Success #stdin #stdout 0.07s 37312KB
stdin
Standard input is empty
stdout
this is <tag1 attribute="0"> and ends with </tag>, okay?
Match!