fork download
  1. def line1 = "LAW FIRM address is required"
  2. def line2 = "address is required"
  3. def regEx = /(?i)^(?!line\b).*\b(TIMEKEEPER|CLIENT|LAW FIRM)\b.*$/
  4.  
  5. if (line1 =~ regEx) {
  6. println "Line1 is found"
  7. } else {
  8. println "Line1 is not found"
  9. }
  10.  
  11. if (line2 =~ regEx) {
  12. println "Line2 is found"
  13. } else {
  14. println "Line2 is not found"
  15. }
Success #stdin #stdout 1.26s 2911744KB
stdin
Standard input is empty
stdout
Line1 is found
Line2 is not found