My subject looks like this:
[9] 20:30:40 [SUCCESS] s-a24:1337
2
8.87
4038047
35320
4002727
[10] 20:30:40 [SUCCESS] s-d28:1337
2
2.64
4038047
37363
4000684
[11] 20:30:40 [SUCCESS] s-b29:1337
2
0.56
4038047
33066
4004981
[66] 20:30:42 [FAILURE] s-b25:1337 Timed out, Killed by signal 9
2
1.16
4038047
35274
[67] 20:30:42 [FAILURE] s-b30:1337 Timed out, Killed by signal 9
I need to create a multi-dimentional array that will match
- success/failure
- descriptor (s-a24, s-d28, etc)
- 5 rows of numbers that follow (can be any length)
There could be anywhere from 0 to 5 rows (5 rows is SUCCESS)
I'm absolutely inept in regex
What I started with is this, it does not work.
preg_match_all("/\[[0-9]+\](.*?)\[[0-9]+\]/",$output,$array);