What can I use instead of lcs (Longest common substring) : <p>I am trying to calculate the common string using lcs, but this algorithm only calculates 1 string. What can I use instead?</p>

<p><strong>LCS =</strong> "<em>aaa</em>bbb<em>ccc</em>xxx" and "<em>aaa</em>ddd<em>ccc</em>" result: "aaa"</p>

<p><strong>but what i want=</strong> "aaaccc" </p>

<p>help please:) </p>
