fork(1) download
  1. class Ideone {
  2. static void main(String[] args) {
  3. def matcher = ("12:29:08 [10:29:07] NIDD version is: SBTS23R1_NIDD_2217_100_01" =~ /NIDD version is:\s*(SBTS\d{2}\w\d_NIDD_\d{4}_\d{3}_\d{2})/)
  4. if (matcher) {
  5. def msg = matcher[0][1]
  6. println("Build failed because of ${msg}")
  7. }
  8. }
  9. }
  10.  
Success #stdin #stdout 2.12s 135784KB
stdin
Standard input is empty
stdout
Build failed because of SBTS23R1_NIDD_2217_100_01