Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hiyas :)
Here's the situation: I have many pairs of 2 strings that may (or may not) match each other from the beginning up to a certain point, then become different. What's the "best" (efficient, clean, etc) way of determining 1). the matching parts of the two strings 2). the part of each that's different?
i.e. for: I want: It isn't hard to iterate over the first string letter by letter and do comparison to the second, but it really seems like there should be a more... elegant solution. Any ideas? Regards, m2. In reply to Matching bits of 2 strings by m2
|
|