fork(1) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. bool contains = Regex.IsMatch("Hello: Hello2", @"\bHello\b(?!:)");
  9. Console.WriteLine(contains);
  10. Console.WriteLine(Regex.IsMatch("Hello: Hello2", @"\bHello(?![:\w])"));
  11. }
  12. }
Success #stdin #stdout 0.06s 29304KB
stdin
Standard input is empty
stdout
False
False