Python Regex Match Between Two Strings Hackerrank