On Mon, Oct 17, 2011 at 10:57 PM, Leo Susanto <[email protected]> wrote:
> From looking at the regex
>
>> if ($line =~
>> /17|18|19|20|21+:(\d+):(\d+)+\n+\n+CELL\s+(\d+)\s+(.+?),.+?HEH/){
>
> against the data
>
>> 10/17/11 18:25:20 #578030
>>
>> 25 REPT:CELL 221 CDM 2, CRC, HEH
>> SUPPRESSED MSGS: 0
>> ERROR TYPE: ONEBTS MODULAR CELL ERROR
>> SET: MLG BANDWIDTH CHANGE
>> MLG 1 BANDWIDTH = 1536
>
> I would assume $1 and $2 wouldn't match to anything plus $5 doesn't exist.
>
> Could you please let us know which part of the data you want to extract?
>
> Fill in the blanks
> $1=
> $2=
> $3=
> $4=
> $5=
>
Thanks everyone. I hope this clarifies what I am trying to match. For
example with this input:
10/17/11 18:25:20 #578030
25 REPT:CELL 221 CDM 2, CRC, HEH
SUPPRESSED MSGS: 0
ERROR TYPE: ONEBTS MODULAR CELL ERROR
SET: MLG BANDWIDTH CHANGE
MLG 1 BANDWIDTH = 1536
$1= Match the time stamp Hour:Min:Sec only if the hour is >= 17 and hour <= 21
$2= capture CELL number
$3= capture the information after the CELL number (and before the first comma)
Thank you,
Chris
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/