Regular expression: Match string between two slashes if the string itself contains escaped slashes,pattern = re.compile('^(?:\\\\.|[^/\\\\])*/((?:\\\\.|[^/\\\\])*)/')