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.
In reply to Re: regexp for searching incremental expressions
by Tomte
in thread regexp for searching incremental expressions
by mod_alex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |