Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Divide a list of string into substrings

by Anonymous Monk
on Jun 22, 2020 at 08:13 UTC ( #11118351=note: print w/replies, xml ) Need Help??


in reply to Re: Divide a list of string into substrings
in thread Divide a list of string into substrings

Thanks for your script.

The approch is good to find a fast solution. If the common substring is in the middle of each string this solution will not find it.

  • Comment on Re^2: Divide a list of string into substrings

Replies are listed 'Best First'.
Re^3: Divide a list of string into substrings
by jcb (Priest) on Jun 23, 2020 at 01:39 UTC
    If the common substring is in the middle of each string this solution will not find it.

    That is the major limitation to this approach. On the other hand, your sample data did not include those and this approach could be a useful preprocessing step to greatly the reduce the volume of input before applying a much-less-efficient brute force search to find those inner common substrings, if they are even a problem.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2020-08-05 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (35 votes). Check out past polls.

    Notices?