Skip to content

Commit 9f1c18c

Browse files
simplify regex
1 parent 8e53f7a commit 9f1c18c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/models-library/src/models_library/basic_regex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
# S3 - AWS bucket names [https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html]
5252
S3_BUCKET_NAME_RE = re.compile(
53-
r"(?!(^xn--|-s3alias$))^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$"
53+
r"^(?!xn--)[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$(?<!-s3alias)"
5454
)
5555

5656
# Datcore file ID

0 commit comments

Comments
 (0)