fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. String str = @"liable for full amount but only in access of the full amount";
  9. foreach (Match m in Regex.Matches(str, @"\bfull amount\b(?<=^(?:(?!full).)*\bfull amount\b)"))
  10. {
  11. Console.WriteLine(m.Value);
  12. }
  13. }
  14. }
Success #stdin #stdout 0.03s 134592KB
stdin
Standard input is empty
stdout
full amount