Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^8: Finding repeat sequences. (Sorry!)

by BrowserUk (Pope)
on Jun 18, 2013 at 20:56 UTC ( #1039664=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $s = 'aaaabaaaabaaaaabaaaab';;
    
    $s =~ /^((.*).*)\2$/ and print "$1/$2";;
    aaaabaaaaba/aaaabaaaab
    
  2. or download this
    $s =~ /^((.*).*)\1*\2$/ and print "$1/$2";;
    aaaabaaaaba/aaaabaaaab
    
  3. or download this
    $s = 'aaaabaaaabaaaaabaaaabaaaaabaaaab';;
    
    $s =~ /^((.*).*)\1*\2$/ and print "$1/$2";;
    aaaabaaaabaaaaabaaaaba/aaaabaaaab
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1039664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2016-08-27 18:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (385 votes). Check out past polls.