pattern.match('foo /bar\\/bam/ baz').group(1)
pattern.match('foo /bar/bam/ baz').group(1)
pattern.match('foo\\/oof /bar\\/bam/ baz').group(1)
Regular expression: Match string between two slashes if the string itself contains escaped slashes