fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. Console.WriteLine(
  8. Regex.Replace("fooFOOfOoFoOBARBARbarbarbAr", "(?i:foo)|BAR", "<$&>")
  9. );
  10. }
  11. }
Success #stdin #stdout 0.09s 21020KB
stdin
Standard input is empty
stdout
<foo><FOO><fOo><FoO><BAR><BAR>barbarbAr