in reply to regexp for searching incremental expressions

You may could experiment with (??{ code })

#!/usr/bin/perl my $test = "4321234"; if ($test =~ m/(\d)((??{ $1 + 1}))/) { print "matched $1 $2 \n"; } __END__ matched 1 2

regards,
tomte


Hlade's Law:

If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.

Replies are listed 'Best First'.
Re: Re: regexp for searching incremental expressions
by mod_alex (Beadle) on Mar 12, 2004 at 12:33 UTC
    I guess you are right
    Thanx, Alex