I'm trying to split a log line which looks like this:
15:10:10,408 INFO <NioProcessor-11> Raw Message: 8=FIXT.1.1|9=317|35=D|49=verifix|
into something like this:
15:10:10
408
INFO
NioProcessor-11
FIXT.1.1
317
D
verifix
each information in split.
I have tried to split it with the split function with only
mystring.split((,)| \\\|) which splits my code to something like that:
15:10:10
408 INFO <NioProcessor-11> Raw Message: 8=FIXT.1.1
9=317
35=D
49=verifix
Then I took the second split 408 INFO <NioProcessor-11> Raw Message: 8=FIXT.1.1
and do a substring. It worked, but not perfectly because sometimes the second split is longer or shorter and it doesn't look to be a good solution.
I would like to know if it's possible to split that string with regex expressions actually. I'm new to regex and I didn't find a way to write an expression that handles my objective.
[, <>]|(?: Raw Message: )?\|?\d+=|\|(?:> [^:]+: |\d+=|[ ,|<>])+