fork(2) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text.RegularExpressions;
  5.  
  6. public class Test
  7. {
  8. public static void Main()
  9. {
  10. var ingoreEducationKeywords= new List<string>(){"Uni", "School", "College",};
  11. var userEducation= new List<string>(){"MCS", "BCS", "School of Arts","College of Medicine"};
  12. var regex = new Regex(
  13. string.Join("|", ingoreEducationKeywords.Select(Regex.Escape))
  14. );
  15. var res = userEducation.Where(s => !regex.IsMatch(s)).ToList();
  16. foreach (var s in res) {
  17. Console.WriteLine(s);
  18. }
  19. }
  20. }
Success #stdin #stdout 0.04s 134912KB
stdin
Standard input is empty
stdout
MCS
BCS