in reply to Regular expression help Needed
As for the actual regex, you asked for all the data, so by that I assume you don't want to get rid of any html tags. I'll also assume you mean TRNsquare_thingy instead of the other way around...
use strict; use warnings; my $blurb = 'Starting the , text and there are more TESTBPR<b>PE12. +3AZ234anything, BPR set ? & @ TRN $ ?of charactersCan be anythin +g BPR* TRN# in here79something here11<b>TRN1 1415161718P +E12.3AZST21st371718PE12.3AZST21stand so on and more text fol +lows'; #035 is the octal for that squarethingy you got there... $blurb =~ /\035BPR(.+)TRN\035/; print "result: $1\n";
Remember rule one...
|
|---|