|
|
| Just another Perl shrine | |
| PerlMonks |
Re: check for power of a number with regexby QM (Priest) |
| on Oct 28, 2009 at 03:13 UTC ( #803567=note: print w/ replies, xml ) | Need Help?? |
|
It appears by the previous posts that the answer is no. Thinking out loud...the solution would have to dynamically invoke the length of a submatch as a quantifier, or count its occurrences, neither of which seems to be allowed. Or you could cheat and check for every power less than n, in a massive alternation, by building a custom regex before the match. -QM
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||