Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Regex problem

by ww (Archbishop)
on Jul 31, 2012 at 22:38 UTC ( [id://984671]=note: print w/replies, xml ) Need Help??


in reply to Regex problem

Another way...

#!/usr/bin/perl use 5.014; # 984660 my $stdout; # I hate this var name; too confuse-able... but it's you +r given my (@string) = <DATA>; for $_(@string) { $stdout .= $_; } if ( $stdout =~ / (?:OVERVIEW) # find start point (and KISS!) (.+) # match pretty much anything (?=AFFECTED\sPRODUCTS) # up to AFFECTED PRODUCTS -- USING A L +OOKAHEAD, (?=...) /xs # extended notation, single line mode (ie, + . matches newlines) ) # close the conditional - not part of rege +x { print "$1\n"; } __DATA__ ...

Output:

This Updated Advisory is a follow-up to the original Advisory titled ô +ICSA-11-273-03ùRockwell RSLogix denial-of-Service Vulnerabilityö that was published September +30, 2011 on the ICS-CERT web page. ICS-CERT is aware of a public report of a denial-of-service vulnerabil +ity in Rockwell AutomationÆs RSLogix application. --------- Begin Update X Part 1 of 2 -------- Rockwell has produced a patch that mitigates this vulnerability for al +l affected versions of FactoryTalk Services Platform and RSLogix 5000. --------- End Update X Part 1 of 2 ----------

Log In?
Username:
Password:

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

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

    No recent polls found