Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: check for power of a number with regex

by QM (Parson)
on Oct 28, 2009 at 03:13 UTC ( #803567=note: print w/replies, xml ) Need Help??


in reply to check for power of a number with regex

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
--
Quantum Mechanics: The dreams stuff is made of

  • Comment on Re: check for power of a number with regex

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://803567]
help
Chatterbox?
[Lady_Aleena]: I wish I could think of a simple script to find out what modules my modules use (if any and including my other modules) and whicch of my modules use my modules (if any).

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2017-05-26 23:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?