in reply to matching everything between over two lines
Hi minixman, here is one way to do it.
use strict; local $/; my $str = <DATA>; while ($str =~ /Message dump:((?:(?!Message dump:).)*)/gs) { print "$1"; } __DATA__ Message dump: 1=4 11:13:2006 Message dump: 1=445=3=56=23=67=23=123=12=34 11:13:2006 Message dump: output: 1=4 11:13:2006 1=445=3=56=23=67=23=123=12=34 11:13:2006
Prasad
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: matching everything between over two lines
by minixman (Beadle) on Feb 23, 2006 at 10:22 UTC | |
by Corion (Patriarch) on Feb 23, 2006 at 10:28 UTC | |
by Sec (Monk) on Feb 23, 2006 at 10:29 UTC | |
|
Re^2: matching everything between over two lines
by minixman (Beadle) on Feb 23, 2006 at 10:30 UTC |