On Mon, 24 Sep 2001, Kenneth Graves wrote:

>    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.

hmm, this seems very useful. what are SAN points? i don't really think i
care if i loose them. do you know if there is a way to have (?{...}) only
be called on a match that will actually result in the regex instead of
everytime that partial match occurs? i'll go look into that construct and
reply afterwards. thanks
-mike
 
> --kag
> 

Reply via email to