Heya, Jean.
TWS - Maestro Infrastructure,METINTSV50601#TWSFIXCLUOFF.TWS_CLU_ OFF:1011,MGR:Sbarbaro (Pinto) Kathryn,AD:Trovello Andrea
i am using php to some part of the file for example
server name:METINTSV50601
jobname:TWSFIXCLUOFF
schedulename:TWS_CLU_OFF
abend#:1011
So there's a bunch of characters that we don't care about,
followed by a comma,
followed by a bunch of characters that we do care about (server name),
followed by a pound,
followed by some more characters that we care about (jobname),
followed by a period,
followed by some more characters that we care about (schedulename),
followed by a colon,
followed by some numbers that we care about (abend#),
terminated by a comma.
We can use a regular expression to describe this string:
-
$matches = array();
-
preg_match('/,(.+?)#(.+?)\\.(.+?):(\\d+?),/', $string, $matches);
-
-
print_r($matches);
-
That should get you started. For more info on regular expressions, check out
this article.