Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: having fun with RE - was: Re: One Zero variants_without_repetition

by oha (Friar)
on Sep 21, 2007 at 13:08 UTC ( #640356=note: print w/replies, xml ) Need Help??


in reply to having fun with RE - was: Re: One Zero variants_without_repetition
in thread One Zero variants_without_repetition

i had some time, and just for fun i optimized the above RE: this is faster by avoiding alot of backtracking.
$_ = "00001111"; print "$_\n" while (s/(1*)0(0*)1/$2${1}10/);
Oha
  • Comment on Re: having fun with RE - was: Re: One Zero variants_without_repetition
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://640356]
help
Chatterbox?
[Discipulus]: be your path light Pirsig
[Corion]: Hi Discipulus!
[Discipulus]: your chautauqua was important for me

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-04-25 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (449 votes). Check out past polls.