Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Regular expression help Needed

by Forsaken (Friar)
on May 06, 2005 at 08:51 UTC ( [id://454628]=note: print w/replies, xml ) Need Help??


in reply to Regular expression help Needed

First of all, when asking a question and then later on changing it, it would be nice if you mentioned the question has been updated or modified. That way people that replied to the original question won't look as though they're talking out of their *insert favorite bodypart here*.

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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://454628]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-19 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found