Problems? Is your data what you think it is? | |
PerlMonks |
Re: check for power of a number with regexby ikegami (Patriarch) |
on Oct 26, 2009 at 01:25 UTC ( [id://803188]=note: print w/replies, xml ) | Need Help?? |
Well, this works:
You can do almost all of the above inside the pattern, except for the $n <= $number check:
Without that check, the regex engine preemptively (and sometimes accurately) throws "Infinite recursion in regex". Back to the drawing board. Update: As best as I can tell, you'd need to be able to change the topic as follows:
But that deosn't even work *with* (?{})!
In Section
Seekers of Perl Wisdom
|
|