What is the best way to parse a console output like ?
"data": [
" TCP 127.0.0.1:3000 127.0.0.1:9595 HERGESTELLT 4432",
" TCP 127.0.0.1:3000 127.0.0.1:9596 HERGESTELLT 4432",
" TCP 127.0.0.1:9584 127.0.0.1:3000 WARTEND 0",
" TCP 127.0.0.1:9585 127.0.0.1:3000 WARTEND 0",
" TCP 127.0.0.1:9595 127.0.0.1:3000 HERGESTELLT 4588",
" TCP 127.0.0.1:9596 127.0.0.1:3000 HERGESTELLT 4588",
]
I need trimed strings splited in sub arrays for each item. The problem is each item is different in length. I guess the best way to parse it is a regular expression?
String.split accepts regex ^^