Created
August 8, 2016 09:26
-
-
Save MikimotoH/16b3aa259501a4cb67014e2fdd450212 to your computer and use it in GitHub Desktop.
use regex to search double quoted string with backslash escaped double quote
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [40]: re.search(r'"(.*?)(?<!\\)"', r'"abc\" \"def" "ghi"') | |
Out[40]: <_sre.SRE_Match object; span=(0, 13), match='"abc\\" \\"def"'> | |
In [41]: print(_40.group(1)) | |
abc\" \"def |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment