Wolfram Language & System 10.0 (2014)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

LongestCommonSubsequence

LongestCommonSubsequence[s1,s2]
finds the longest contiguous subsequence of elements common to the strings or lists and .

Details and OptionsDetails and Options

  • If there are several common subsequences of the same length, LongestCommonSubsequence returns the one that appears earliest in .
  • For strings, setting the option IgnoreCase->True makes LongestCommonSubsequence treat lowercase and uppercase letters as equivalent, and return the form of common subsequence that occurs in .
Introduced in 2008
(7.0)