G'day ImJustAFriend,
Looking at the code you've posted, I'm wondering if you were trying to adapt the solution I provided to you in
"Re: Multiple Line Regex Not Working". If so, it seems there may be some part(s) you didn't understand.
Please ask if this is still the case.
I put your input data in a file this time and wrote the following script.
Compare it with the last one.
#!/usr/bin/env perl
use strict;
use warnings;
use autodie;
my $file = 'pm_1226079_input.txt';
my $SEP = '-' x 40 . "\n";
open my $fh, '<', $file;
{
local $/ = "\n******************* NRG location";
while (<$fh>) {
chomp;
/parameters after change .+?\n(.*)\z/ms && print "$SEP$1\n";
}
}
Notes:
-
Use a lexical filehandle.
See open.
-
Always localise changes to special variables
in the smallest scope possible.
These are global variables and you don't want these changes propagated throughout your entire script.
See also perlvar (and its multiple uses of local throughout).
-
The autodie pragma takes care of all of the
"... or die "...";" parts of your script.
It saves you having to write them: they're easy to forget; and easy to get wrong
(such as leaving out the name of the file that failed to open :-)
Here's the output from that script:
----------------------------------------
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
----------------------------------------
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