fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. Console.WriteLine(Regex.Matches("hello a5 world", "\\ba5\\b").Count > 0);
  9. Console.WriteLine(Regex.Matches("hello a55 world", "\\ba5\\b").Count > 0);
  10. Console.WriteLine(Regex.Matches("hello xa5 world", "\\ba5\\b").Count > 0);
  11. }
  12. }
Success #stdin #stdout 0.07s 33776KB
stdin
Standard input is empty
stdout
True
False
False