ColonelPanic has asked for the wisdom of the Perl Monks concerning the following question:
--ColonelPanicmy @conds; my $outer_conditional = qr/ ( #(??{$term}) (?: (?: && | \|\| | & | \| | \^ ) #(??{$term}) )+ ) (?{push(@conds, $^N), print " cond $^N\n"}) /x; while ($line =~ /$outer_conditional/g) { my $conds = join ", ",@conds; print "Conditionals: $conds\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: executing code within a regex
by tilly (Archbishop) on May 07, 2004 at 21:33 UTC | |
by ColonelPanic (Friar) on May 07, 2004 at 21:36 UTC | |
|
Re: executing code within a regex
by BrowserUk (Patriarch) on May 07, 2004 at 22:18 UTC | |
|
Re: executing code within a regex
by hv (Prior) on May 07, 2004 at 23:00 UTC | |
|
Re: executing code within a regex
by dave_the_m (Monsignor) on May 07, 2004 at 23:03 UTC | |
by ColonelPanic (Friar) on May 10, 2004 at 12:37 UTC |