Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: longest common substring (with needed tweaks)

by R56 (Acolyte)
on Oct 27, 2013 at 14:56 UTC ( #1059910=note: print w/ replies, xml ) Need Help??


in reply to Re: longest common substring (with needed tweaks)
in thread longest common substring (with needed tweaks)

Hey Athanasius!

1) Yes, it's exactly digit-space-digit, so my regex will work.

2) I can see that's a bit hard to understand. Let me try again. First number tells us how many strings will be considered for comparison. Second number tells us the minimum number of strings where the substring has to appear. For instance:

3 3 strrringggg ssttrrringggg stttrrringgg

output will be 'rrr'

3 2 strrringggg ssttrrringggg stttrrringgg

output will be 'gggg'

It is a weird filter, I know, but it needs to be that way.

3) Yeah, I already read on the subject but can't seem to figure out how to make the changes. My initial idea was that some clever well-places loops would get me what I wanted, but know I'm starting to see it's not that simple.

Thanks for the help though!


Comment on Re^2: longest common substring (with needed tweaks)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2014-09-17 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (53 votes), past polls