Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Longest repeated string...

by hv (Prior)
on Feb 03, 2006 at 19:31 UTC ( [id://527788]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      $string =~ /(.{$n}).*\1/;
    
  2. or download this
      sub longestrepeat {
        my($string) = @_;
    ...
          return $n - 1 unless $string =~ /(.{$n}).*\1/;
        }
      }
    
  3. or download this
      $string =~ /(.{$n}).*\1.*\1/;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-25 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found