Hi, I’ve got a unique problem here – I’m very new to php and am trying to solve a problem where I need to parse the output of a few command line commands to be used in some code. I have this working, but there’s got to be a better solution.
Here’s a few example strings:
R1_testing_client: s(app1), v(1.0.0), e(dev_int), x(HA), z(APPUSERHA)
R1_testing_client: s(ny_app23), e(alpha), v(2.1), z(CUGATEWAY)
R1_testing_client: s(director), z(CUGATEWAY), e(beta2), v(3.1.4.a)
I need to parse out the s(*), v(*), x(
Here’s what i have to get the s(*) value for example. As you can tell, if s(
[CODE]
$splitDescr = explode(“:”, $description);
$splitDescr = explode(“,”, $splitDescr[1]);
$appname = substr(trim($splitDescr[0]), 2, -1);