Let's say I have two strings that contain similar (but not identical) substrings:
A = """Here is a test of a sentence with a few words in it.
The rest of this sentence is different, though."""
B = """And here is a test of a sent;ence with a few wordz in it,
as well. The quick brown fox jumped over the lazy dogs."""
How can I get the similar text between them, i.e. "Here is a test of a sentence with a few words in it" in A and "here is a test of a sent;ence with a few wordz in it" in B?
Edit: as far as I know, this isn't the same thing as calculating an edit distance. Sure, I can calculate an edit distance between "sentence" and "sent;ence", but that doesn't help me to identify the matching substrings.