How would I write a function or routine that would compare two strings and show the difference between them?
e.g.
string1="It will rain tomorrow"
string2="It will snow tomorrow"
comparison result (string2 vs string 1) = "It will rainsnow tomorrow"
What I want is something akin to what MS Word will do when it compares documents.
The actual thing I want to do is when comparing two data tables, particularly differences in tables scripts and column formulas.
Compare Data Tables will show, for instance, if saved table scripts are different and list them both out, which I can save to a table with the strings in the table in separated columns, but what I want to see is where those two scripts are different.
Seems like this could be done with regular expressions, I just don't know how.
Maybe Shortest Edit Script() could be enough?
https://www.jmp.com/support/help/en/15.2/#page/jmp/identifying-differences-between-strings-lines-or-sequences.shtml
https://www.jmp.com/support/help/en/15.2/index.shtml#page/jmp/utility-functions.shtml#ww3843203