fork(3) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. var pattern = "He**o";
  8. var rx = new Regex(string.Format("^{0}$",Regex.Escape(pattern.Replace("*", "AsTeRiSSK")).Replace("AsTeRiSSK", ".")));
  9. Console.WriteLine(rx.ToString());
  10. var word1 = "Hello";
  11. var word2 = "He7(o";
  12. Console.Write(rx.IsMatch(word1) && rx.IsMatch(word2));
  13. }
  14. }
Success #stdin #stdout 0.11s 24336KB
stdin
Standard input is empty
stdout
^He..o$
True