diff --git a/omv_backup.py b/omv_backup.py index 126d070..4c2d131 100755 --- a/omv_backup.py +++ b/omv_backup.py @@ -627,7 +627,7 @@ if _BACKUP: if _EXECUTE: status, output = subprocess.getstatusoutput(cmnd) for f in output.splitlines(): - pattern = r"^[0-9]{4}.*" # regex pattern: string starts with 'abc' + pattern = r"^[0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]{2}-[0-9]{2}-[0-9]{2}" # regex pattern: string starts with 'abc' logging.info(f"Checking {f}") if re.match(pattern, f): logging.info("Match!")