Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
> Though most people would probably nest flip-flops:

Here a demonstration:

use strict; use warnings; my $count=0; while (<DATA>) { if ( /^<13>/ .. /^END OF REPORT$/ ){ if (/\*\sparameters after change\s\=/ .. /\*\sNRG location\s\= +/) { print "$count: $_"; } } else { $count++ } } __DATA__ <13>Nov 13 17:27:25 OamCOMM[12260]: TIMESTAMP=Tue Nov 13 17:27:25 2018 MSGCLS=OAMOPE Title=OAM Create OPERATION Severity=Inform message={username:xxxx@::xxxx:xxx.xxx.xxx.x; causeDISTINGUISH_NAME=epsProfileId=xxxxx,pSProfileDataId=x,subscripti +onProfileD +ataId=x,managedElementId=xxxx USER_LABEL= ******************* parameters after change =******************* epsMaxRequestedBandwidthUL=xxxxxxxxx epsMaxRequestedBandwidthDL=xxxxxxxxx epsQosAllocRetPrioVulnerabilit=xxxxxxx epsQosAllocRetPrioCapability=xxxxxxx epsQosAllocRetPrioLevel=xxxxxxxxx epsQosClassId=xxxxxx sessionTimeout=xxxxxxx idleTimeout=xxxx epsChargingCharacteristics=xxxxxx epsVplmnDynamicAddrAllowed=xxxxxxxxxx epsGwAllocType=xxxxxx epsPdnType=xxxxxx epsAccessPointName=xxxxxx.xxxxxxx ******************* NRG location =******************* NRG_KEY=x } Message Id=10011 END OF REPORT <13>Nov 13 17:27:25 OamCOMM[12260]: TIMESTAMP=Tue Nov 13 17:27:25 2018 MSGCLS=OAMOPE Title=OAM Create OPERATION Severity=Inform message={username:xxxx@::xxxx:xxx.xxx.xxx.x; causeDISTINGUISH_NAME=packetDataProtocolProfileId=xxxxx,gPacketProtoc +olProfileD +ataId=x,pSProfileDataId=x,subscriptionProfileDataId=x,managedElementI +d=xxxx USER_LABEL= ******************* parameters after change =******************* meanThroughPutClass=xxxxxx peakThroughPutClass=xxxxx reliabilityClass=xxxx delayClass=xxxx precedenceClass=xxxxx hSDPAguaranteeFlag=x hSUPAguaranteeFlag=x hSUPAflag=x hSDPAflag=x downlinkGuaranteedBR=xxx uplinkGuaranteedBR=xx trafficHandlingPriority=xxxxxxx transferDelay=xx ratioSduError=xxxx residualBER=xxxx downlinkMaxBR=xxx uplinkMaxBR=xx maxSduSize=xxx deliveryOfErroneousSdu=xx deliveryOrder=xx trafficClass=xxxxxxxx priorityOfUmtsBearer=xxxxxxx vplmnAddressAllowedFlag=x pdpChargingCharacteristic=xxxxxx accessPointName=xxxxxx.xxxxxxx pdpType=xxxx ******************* NRG location =******************* NRG_KEY=x } Message Id=10011 END OF REPORT

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice


In reply to Re^2: Extract Block Of Text From Log by LanX
in thread Extract Block Of Text From Log by ImJustAFriend

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-25 05:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found