Python Get String Between Substrings In Sql