Python match and return string in between
re.search(re.escape(stringB) + "(.*?)" + re.escape(stringC), stringA).group(1)
>>>
>>> stringA = "xxxxxxFoundAaaaaaaaaaaaaaaFoundBxxxxxxx"
>>> stringB = "FoundA"
>>> stringC = "FoundB"
>>>
>>> import re
>>> re.search(re.escape(stringB)+"(.*?)"+re.escape(stringC),stringA).group(1)
'aaaaaaaaaaaaaa'
>>>