Let's say that I have two strings:
$first = 'this is a stupid example, csdude is a dang fool';
$second = 'this is a example, csdude is a **** fool';
I would like to compare the two, and denote the differences in some way. Ideally, the outcome would be:
$result = 'this is a <strike>stupid</strike> example, csdude is a <strike>dang</strike> fool';
In practice the first string is submitted by the user, then a series of filters are ran to create the second string. There could be any number of words in the second string that are missing or redacted from the first string, but the second string will never contain more than the first string.
I considered changing the filter to change matches to <strike>whatever</strike>, and then after it's over change <strike>whatever</strike>, but it's never consistent... sometimes it would be ****, sometimes it would be $1**** or ****$2, or just removed entirely with no redacting.