Re: [Boston.pm] A regex question

2005-07-30 Thread Ranga Nathan
I got it. The (??{code}) replaces the result of the code as a regex and then evaluates it on the fly. So, my $x = "04abcdefghijklmnopqur"; $x =~ /^(.{2})((??{'.{' . 3*$1 . '}'}))(.*)/; print "1 = $1\n 2 = $2 \n 3 = $3\n "; worked. BTW, my perl 5.8 regex documentation still says that (??{co

[Boston.pm] A regex question

2005-07-30 Thread Bob Rogers
From: Ranga Nathan <[EMAIL PROTECTED]> Date: Sat, 30 Jul 2005 19:55:38 -0700 I need to parse a string containing a repeating group. There is a count that holds the repeat count. Only when I extract the count will I know how many repeats there are . . . I think the (??{code}) c

[Boston.pm] A regex question

2005-07-30 Thread Ranga Nathan
I need to parse a string containing a repeating group. There is a count that holds the repeat count. Only when I extract the count will I know how many repeats there are. For example: isbn,title,copies,{author list} is coded as (this is coming from the mainframe. I have no control over the for