fork(1) download
  1. import re
  2. rx = r"Event demon log entry:[\r\n]*\[[^]]+]\s*(.*?)\s*EVENT: ALARM"
  3. s = "Event demon log entry:\n\n[27/12/2018 04:48:17] CAUAJM_I_40245 EVENT: ALARM ALARM: JOBFAILURE JOB: bx_p2_reporting EXITCODE: 1"
  4. print(re.findall(rx, s, re.IGNORECASE))
Success #stdin #stdout 0.01s 27728KB
stdin
Standard input is empty
stdout
['CAUAJM_I_40245']