This commit is contained in:
2025-08-26 10:35:02 +02:00
parent 9e7b774601
commit c5d915ad87

View File

@@ -627,7 +627,7 @@ if _BACKUP:
if _EXECUTE: if _EXECUTE:
status, output = subprocess.getstatusoutput(cmnd) status, output = subprocess.getstatusoutput(cmnd)
for f in output.splitlines(): for f in output.splitlines():
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' 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}") logging.info(f"Checking {f}")
if re.match(pattern, f): if re.match(pattern, f):
logging.info("Match!") logging.info("Match!")