fork download
  1. using System;
  2. using System.Text.RegularExpressions;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8.  
  9.  
  10. String input = @"Complaint listed in some portal is like below RequirementChanges caused disturbance of 200 hours of rework. Due to this there is a request reported in Excel.";
  11.  
  12. Regex rgx = new Regex(@"\S+(?=\s+caused disturbance)|\S+\s+\S+(?=\s+of rework)|(?<=\breported in\s+)\S+");
  13.  
  14. foreach (Match m in rgx.Matches(input))
  15. Console.WriteLine(m.Groups[0].Value);
  16.  
  17. }
  18. }
Success #stdin #stdout 0.08s 24480KB
stdin
Standard input is empty
stdout
RequirementChanges
200 hours
Excel.