I am trying to write a regular expression for Input text, where i have to extract all WARN code with the message ahead. In general the WARN may or may not be multiline as shown below.
[C] L1250 WARN k2 bw34 Flex - Sockets:<16>, ThreadsPerCore:<1>
[C] L1250 WARN For abcd (analytical and transactional workloads). For 12s Systems and above, should be
disabled.
[C] L1250 INFO For abcd (analytical workloads), Hyperthreading should be enabled , 8s, 12s, 14d, 34t
d above.
[C] L1250 WARN Intel's Hyperthreading on 18+ Socket system disabled. Should be disabled urgently
fix it!
[C] L1300 OK CPU governors set as recommended
[C] L1250 WARN Intel's Hyperthreading on 8+ Socket system disabled.
Initially, i started with regex: (WARN).*(\b|\B), this captures till end of word/non word boundary, which does not capture following multiline(continuing WARN description).
Then i tried-> WARN.+([\S\s]*?)+(?=\[C\]) but this does not capture last WARN line, as there is no further [C] marker.