Standardize placement of hyphen in regex
Always place the hyphen at the end of the character set in our regular
expressions for build names and origins, to ensure that hyphens always
get treated as literals and not as part of a range.
@@ -131,11 +131,11 @@ config["conda_environment"] = CONDA_ENV_PATH
# Define patterns we expect for wildcards.
wildcard_constraints:
- # Allow build names to contain alpha characters, underscores, and hyphens
+ # Allow build names to contain alphanumeric characters, underscores, and hyphens
# but not special strings used for Nextstrain builds.
- build_name = r'(?:[a-zA-Z0-9-_](?!(tip-frequencies)))+',
+ build_name = r'(?:[a-zA-Z0-9_-](?!(tip-frequencies)))+',
date = r"[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]",
- origin = r"[a-zA-Z0-9-_]+"
+ origin = r"[a-zA-Z0-9_-]+"
localrules: clean
