I have two strings like:
a = '54515923333558964'
b = '48596478923333558964'
Now the longest postfix match is
c = '923333558964'
what will be a solution using re?
Here is a solution I found for prefix match:
import re
pattern = re.compile("(?P<mt>\S*)\S*\s+(?P=mt)")
a = '923333221486456'
b = '923333221486234567'
c = pattern.match(a + ' ' + b).group('mt')