fork(3) download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. namespace RegExApplication
  5. {
  6. public class Program
  7. {
  8. public static void Main(string[] args)
  9. {
  10.  
  11. var pattern = "<<.*?FirstName.*?>>";
  12. var template = "<<FirstName>> <<FirstName>>";
  13. var replaceWith = "FOO";
  14.  
  15. var regex = new Regex(pattern);
  16.  
  17. Console.WriteLine(regex.Replace(template, replaceWith));
  18. }
  19. }
  20. }
Success #stdin #stdout 0.09s 24552KB
stdin
Standard input is empty
stdout
FOO FOO