in reply to Re: Regex fun
in thread Regex fun
It's simpler than that: The quantifier cannot be variable.This must mean something other than what it seems (to me) to mean:
shows that the ‘length’ of the quantifier can be given by a variable.$ perl -E 'my $quant = 2; "ab" =~ /.{$quant}/ and say "Matched"' Matched
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Regex fun
by ikegami (Patriarch) on Dec 15, 2009 at 21:27 UTC | |
by JadeNB (Chaplain) on Dec 15, 2009 at 21:59 UTC | |
by ikegami (Patriarch) on Dec 15, 2009 at 22:22 UTC | |
by JadeNB (Chaplain) on Dec 15, 2009 at 22:55 UTC | |
by ikegami (Patriarch) on Dec 16, 2009 at 00:55 UTC |
In Section
Seekers of Perl Wisdom