Date: Mon, 24 Sep 2001 17:36:10 -0400 (EDT)
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
all input conform to this regex: /first: (?:\d+\n)+\nlast: (?:\d+\n)+/
use one regex match and construct a data structure that will allow you
to print out
"first numbers are a1, ... and the last numbers are b1, ... bn"
give my fantacy regex memory scheme i would do this
$text =~ /first: (\d+\n)+\nlast: (\d+\n)+/;
print "first numbers are "
. join (",",@$mem[0]);
print "and the last numbers are".
join (",",@$mem[1]);
Check the perlre pod for the (?{...}) section. (WARNING: you may
lose SAN points.) You can push things into arrays at every partial
match, or whatever else you want.
--kag
- [Boston.pm] perl regex memory missing two dimentions [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Kenneth Graves
- Re: [Boston.pm] perl regex memory missing two dimen... Chris Devers
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... Kenneth Graves
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
- Re: [Boston.pm] perl regex memory missing two dimen... Jerrad Pierce
- Re: [Boston.pm] perl regex memory missing two dimen... Kenneth Graves
- Re: [Boston.pm] perl regex memory missing two dimen... Greg London
- Re: [Boston.pm] perl regex memory missing two dimen... [EMAIL PROTECTED]
