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 ----------
In reply to Re: Regex problem
by ww
in thread Regex problem
by jayto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |