Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: how to write multi-line regex

by NetWallah (Canon)
on Mar 24, 2014 at 04:44 UTC ( [id://1079481]=note: print w/replies, xml ) Need Help??


in reply to how to write multi-line regex

If you are sure blocks of logical "records" wont get mixed up, you can try this regex:
/TEXT;\p{Space}*LAYER 13[1-7];\s+TEXTTYPE\p{Space}0;.+STRING\s(\S+\w +).+?ENDEL;/s
To get proper logical blocks, you probably need something like:
local $/="ENDEL;\n";
But if you use this, you will need to drop the trailing ENDEL; in the regex.

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-16 12:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found