fork(8) download
  1. class Ideone {
  2. static void main(String[] args) {
  3. String s = "08:28:57,990 DEBUG [http-0.0.0.0-18080-33] [tester] [1522412937602-580613] [TestManager] ABCD: loaded 35 test accounts"
  4. def res = s =~ /\b([A-Z]{4}):[^\]\[\d]*(\d{1,5})\b/
  5. if (res.find()) {
  6. println "${res[0][1]}, ${res[0][2]}"
  7. } else {
  8. println "not found"
  9. }
  10. }
  11. }
  12.  
Success #stdin #stdout 0.93s 85472KB
stdin
Standard input is empty
stdout
ABCD, 35