diff --git a/qutebrowser/browser/downloads.py b/qutebrowser/browser/downloads.py index 5a2daae7e..dc0d83cbc 100644 --- a/qutebrowser/browser/downloads.py +++ b/qutebrowser/browser/downloads.py @@ -180,7 +180,7 @@ def transform_path(path): path = utils.expand_windows_drive(path) # Drive dependent working directories are not supported, e.g. # E:filename is invalid - if re.match(r'[A-Z]:[^\\]', path, re.IGNORECASE): + if re.fullmatch(r'[A-Z]:[^\\]', path, re.IGNORECASE): return None # Paths like COM1, ... # See https://github.com/qutebrowser/qutebrowser/issues/82 diff --git a/qutebrowser/browser/webengine/spell.py b/qutebrowser/browser/webengine/spell.py index ee2fb7813..9166180d4 100644 --- a/qutebrowser/browser/webengine/spell.py +++ b/qutebrowser/browser/webengine/spell.py @@ -30,7 +30,7 @@ from qutebrowser.utils import log def version(filename): """Extract the version number from the dictionary file name.""" version_re = re.compile(r".+-(?P[0-9]+-[0-9]+?)\.bdic") - match = version_re.match(filename) + match = version_re.fullmatch(filename) if match is None: raise ValueError('the given dictionary file name is malformed: {}' .format(filename)) diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 8d0af173b..320798f6b 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -963,7 +963,7 @@ class Font(BaseType): # Gets set when the config is initialized. monospace_fonts = None font_regex = re.compile(r""" - ^( + ( ( # style (?P