Wolfram Language & System 10.3 (2015)|Legacy Documentation

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

LongestCommonSubsequencePositions

LongestCommonSubsequencePositions[s1,s2]
finds the longest contiguous subsequence of elements common to the strings or lists and and returns their positions in and .

Details and OptionsDetails and Options

  • For lists , Take[si,posi] returns the longest common subsequence. For strings , StringTake[si,posi] returns the longest common contiguous substring.
  • If there are several common subsequences of the same length, LongestCommonSubsequencePositions returns the position of the one that appears earliest in .
  • For strings, setting the option IgnoreCase->True makes LongestCommonSubsequencePositions treat lowercase and uppercase letters as equivalent, and returns the form of common subsequence that occurs in .
Introduced in 2015
(10.2)