Improve 'find first quotation' regex
Reported by http://www.dfranke.com/blog/2012/08/20/offlineimap-error-beim-syncen-mit-lotus-domino/ our 'find the first quote possible containing encoded quotation marks' regex did not seem to have caught all cases. E.g. "\\". Verified the fix as good. Thanks Daniel Franke. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
@ -23,7 +23,7 @@ from offlineimap.ui import getglobalui
|
||||
|
||||
# find the first quote in a string
|
||||
quotere = re.compile(
|
||||
r"""(?P<quote>"(?:\\"|[^"])*") # Quote, possibly containing encoded
|
||||
r"""(?P<quote>"[^\"\\]*(?:\\"|[^"])*") # Quote, possibly containing encoded
|
||||
# quotation mark
|
||||
\s*(?P<rest>.*)$ # Whitespace & remainder of string""",
|
||||
re.VERBOSE)
|
||||
|
Reference in New Issue
Block a user