Using the below regex I was able to extract first7 fields
Need to extract the last 3 fields
How to skip the blank <> <> tags and continue?
Sample Event:
####(DateTime) (Info) (Health) (host.domain.name) (component1) (component2) ((anonymous)) () () (1363678659879) (BEA-310002) (54% of the total memory in the server is free)
####<(?P< F1>[^>]+)> \s+<(?P[^>]+)>\s+<(?P [^>]+)>\s+<(?P [^.]+)[^<\n]<(?P [^>]+)>\s+<(?P [^>]+)>\s+<(?P [^>]+>)>
####<(?P< FIELDNAME1>[^>]+)> \s+<(?P[^>]+)>\s+<(?P [^>]+)>\s+<(?P [^.]+)[^<\n]<(?P [^>]+)>\s+<(?P [^>]+)>\s+<(?P [^>]+>)>[^>\n]>\s[^>\n]>\s+<(?P [^>]+)>\s+<(?P [^>]+)>\s+<(?P [^>]+)>
You need to change the '+' to a '*' in any field that can be empty.
e.g:
[^>]+ must match at least one character that is not '>'
[^>]* can match no characters
Figured out the issue. The field before empty has 2 angular braces <
No luck !! Tried '*' in the place of '+'. Not able to locate 3rd last field
Original sample Event:
####< > <> <> <1363678659879> <54% of the total memory in the server is free>