Мне нужно извлечь два разных числа, которым предшествуют две разные строки. Employee Id--> Employee16
(мне нужно 16) и Employee links--> Employee links:2
(мне нужно 2). Исходная строка выглядит следующим образом:
Employee16, Employee name is QueenRose
Working for 46w0d
Billing is Distributed
65537 assigned tasks, 0 reordered, 0 unassigned
0 discarded, 0 lost received, 5/255 load
received sequence unavailable, 0xC2E7 sent sequence
Employee links: 2 active, 0 inactive (max not set, min not set)
Dt3/5/10:0, since 46w0d, no tasks pending
Dt3/5/10:10, since 21w0d, no tasks rcvd
Employee is currently working in Hardware section.
Employee19, Employee name is Edward11
Working for 48w4d
Billing is Distributed
206801498 assigned tasks, 0 reordered, 0 unassigned
655372 discarded, 0 lost received, 9/255 load
received sequence unavailable, 0x23CA sent sequence
Employee links: 7 active, 0 inactive (max not set, min not set)
Dt3/5/10:0, since 47w2d, tasks pending
Dt3/5/10:10, since 28w6d, no tasks pending
Dt3/5/10:11, since 18w4d, no tasks pending
Dt3/5/10:12, since 18w4d, no tasks pending
Dt3/5/10:13, since 18w4d, no tasks pending
Dt3/5/10:14, since 18w4d, no tasks pending
Dt3/5/10:15, since 7w2d, no tasks pending
Employee is currently working in Hardware sectione.
Employee6 (inactive)
Employee links: 2
Dt3/5/10:0 (inactive)
Dt3/5/10:10 (inactive)
Employee7 (inactive)
Employee links: 2
Dt3/5/10:0 (inactive)
Dt3/5/10:10 (inactive)
Пробовал со следующим:
Employee(\d+)[^\n\r]*[^M]*Employee links:\s+(\d+)
Ожидается, что вывод будет выглядеть так:
16 2
19 7
6 2
7 2
Но не перечисляет все идентификаторы и ссылки. Может ли кто-нибудь помочь мне получить это?