I would like to extract this data and store it in an array. But I can't seem to find the proper regular expression.
-- Schedd: LP0162.marin.local : <172.16.102.40:58875>
ID OWNER SUBMITTED RUN_TIME ST PRI SIZE CMD
13.0 JJansen 2/6 09:17 0+00:01:28 I 0 1953.1 Test.bat
13.1 JJansen 2/6 09:17 0+00:01:28 I 0 1953.1 Test.bat
13.2 JJansen 2/6 09:17 0+00:01:28 I 0 1953.1 Test.bat
13.3 JJansen 2/6 09:17 0+00:01:27 I 0 1953.1 Test.bat
13.4 JJansen 2/6 09:17 0+00:00:50 I 0 1953.1 Test.bat
13.5 JJansen 2/6 09:17 0+00:00:50 I 0 1953.1 Test.bat
13.6 JJansen 2/6 09:17 0+00:00:50 I 0 1953.1 Test.bat
13.7 JJansen 2/6 09:17 0+00:00:50 I 0 1953.1 Test.bat
It should return something like this:
Array
(
[0] => array
[0] => 13.0
[1] => JJansen
[2] => 2/6 09:17
[3] => 0+00:01:28
[4] => I
[5] => 0
[6] => 1953.1
[7] => Test.bat
[1] => array
...
)
...
I would try to go for a combination of reading the input per line (or exploding it on line-break) and explode it by using preg_split()
, where you can use the regular expression (\S+)
, @acarlon wrote.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments