par
Nestecha » 08 nov. 2014, 04:09
<?php
function after ($this, $inthat)
{
if (!is_bool(strpos($inthat, $this)))
return substr($inthat, strpos($inthat,$this)+strlen($this));
};
function before ($this, $inthat)
{
return substr($inthat, 0, strpos($inthat, $this));
};
function between ($this, $that, $inthat)
{
return before ($that, after($this, $inthat));
};
$sLine = "GRE_JEAN_JAURES;NW/UTRAN BTSEquipment/GRE_JEAN_JAURES Board/723467;10-04-2014 11:14:28;null;processing error;warning;active;softwareProgramError;TRDU/11 SOFTWARE DUMP;TRDU/11 SOFTWARE DUMP Specific Problem:TRDU/11 SOFTWARE DUMP, Cabinet:11, Shelf:10, Slot-position:11, AdditionalInformationFromNE:additionalInformation = { manufacturerInfoAscii = GP_TRDU Pmdz :The system was power-cycled. - Cause:1 - RRH F/W:_BI_RE_TE_TR_BAND01_FV_1.2.18 - HwRel:AB04 - PEC:3JR21012AB - SN: GPCSTW1000501913 - MOD:TRDUBAND014C60W - SWver:UNB0814A110 } ;BTS_0002_00064;";
echo 'PEC'.between('PEC','-',$sLine);
$sLineSecond = "CINQ_AVENUES;NW/UTRAN BTSEquipment/CINQ_AVENUES Board/81;10-04-2014 15:47:45;null;processing error;warning;active;softwareProgramError;CCM/81 SOFTWARE DUMP;CCM/81 SOFTWARE DUMP Specific Problem:CCM/81 SOFTWARE DUMP, Cabinet:0, Shelf:0, Slot-position:81, AdditionalInformationFromNE:additionalInformation = { manufacturerInfoAscii = Uptime : 52 days 04:05:43.Sequence num: 32.Thread name : tCpManager.Thread ID : 0x36ddb4b0.Error number: 0.Signal : 11.State and Misc Registers:. TRAP : 00000300. MSR : 0202d200. DAR : 00000096. DSISR: 00800000. IAR : 0d39299c. SP : 36dda7e0. LR : 0d391810. CR : 24004442. CTR : 0cdb1d60. XER : 00000000.Traceback:. 0d39299c. 0d3e1a80. 0d407f64. 0 f79ef74. 0d47c590. 0d47d00c. 0f822178. 0fd22ccc. 30028d8c. 0ff25a90. 00000000. 00000000. 00000000. 00000000. 00000000 . 00000000. 00000000. 00000000. 00000000. 00000000.HwRel:CA01 - PEC:3JR20073BC - SN:YP14160B64C - MOD:MOD:eCCM-U_GE - SWver :UNB0814A110 } ;BTS_0002_00001;";
echo 'PEC'.between('PEC','-',$sLineSecond);
Genre ça ?
[php]<?php
function after ($this, $inthat)
{
if (!is_bool(strpos($inthat, $this)))
return substr($inthat, strpos($inthat,$this)+strlen($this));
};
function before ($this, $inthat)
{
return substr($inthat, 0, strpos($inthat, $this));
};
function between ($this, $that, $inthat)
{
return before ($that, after($this, $inthat));
};
$sLine = "GRE_JEAN_JAURES;NW/UTRAN BTSEquipment/GRE_JEAN_JAURES Board/723467;10-04-2014 11:14:28;null;processing error;warning;active;softwareProgramError;TRDU/11 SOFTWARE DUMP;TRDU/11 SOFTWARE DUMP Specific Problem:TRDU/11 SOFTWARE DUMP, Cabinet:11, Shelf:10, Slot-position:11, AdditionalInformationFromNE:additionalInformation = { manufacturerInfoAscii = GP_TRDU Pmdz :The system was power-cycled. - Cause:1 - RRH F/W:_BI_RE_TE_TR_BAND01_FV_1.2.18 - HwRel:AB04 - PEC:3JR21012AB - SN: GPCSTW1000501913 - MOD:TRDUBAND014C60W - SWver:UNB0814A110 } ;BTS_0002_00064;";
echo 'PEC'.between('PEC','-',$sLine);
$sLineSecond = "CINQ_AVENUES;NW/UTRAN BTSEquipment/CINQ_AVENUES Board/81;10-04-2014 15:47:45;null;processing error;warning;active;softwareProgramError;CCM/81 SOFTWARE DUMP;CCM/81 SOFTWARE DUMP Specific Problem:CCM/81 SOFTWARE DUMP, Cabinet:0, Shelf:0, Slot-position:81, AdditionalInformationFromNE:additionalInformation = { manufacturerInfoAscii = Uptime : 52 days 04:05:43.Sequence num: 32.Thread name : tCpManager.Thread ID : 0x36ddb4b0.Error number: 0.Signal : 11.State and Misc Registers:. TRAP : 00000300. MSR : 0202d200. DAR : 00000096. DSISR: 00800000. IAR : 0d39299c. SP : 36dda7e0. LR : 0d391810. CR : 24004442. CTR : 0cdb1d60. XER : 00000000.Traceback:. 0d39299c. 0d3e1a80. 0d407f64. 0 f79ef74. 0d47c590. 0d47d00c. 0f822178. 0fd22ccc. 30028d8c. 0ff25a90. 00000000. 00000000. 00000000. 00000000. 00000000 . 00000000. 00000000. 00000000. 00000000. 00000000.HwRel:CA01 - PEC:3JR20073BC - SN:YP14160B64C - MOD:MOD:eCCM-U_GE - SWver :UNB0814A110 } ;BTS_0002_00001;";
echo 'PEC'.between('PEC','-',$sLineSecond);[/php]
Genre ça ?