none
Powershell Get-LCS returns non contiguous strings as the longest match RRS feed

  • Question

  • Hi,

    I'm using the latest version of get-lcs from here:

    get-lcs code

    However the code seems to return non-contiguous string as the "longest common substring":

    PS C:\temp\powershell> $s1="Juniper2GPMIgration_v11.0"
    
    PS C:\temp\powershell> $s2="Juniper2GPMIgration_v13.0"
    
    PS C:\temp\powershell> Get-LCS $s1 $s2
    J
    u
    n
    i
    p
    e
    r
    2
    G
    P
    M
    I
    g
    r
    a
    t
    i
    o
    n
    _
    v
    1
    .
    0
    

    Is this the way it is supposed to work?

    I'm after a contiguous string as the common substring. How can I fix this?

    • Moved by Bill_Stewart Wednesday, November 29, 2017 6:48 PM User doesn't understand output that is WAD
    Monday, October 23, 2017 1:18 AM

All replies