V1 Subdomain change

Regex

/^(?!xn--|sthree-|sthree-configurator)(?!.*-s3alias$)(?!.*--ol-s3$)(?!.*(\.\.|--|__))(?!.*\.-|\.-|-$)[a-z0-9][a-z0-9-]{0,62}[a-z0-9]$/
This regex is designed to validate a string (likely a domain name, bucket name, or similar) by enforcing specific constraints on allowed characters and patterns. Here's a breakdown of the restrictions:

Allowed:

Lowercase Letters (a-z)
Digits (0-9)
Hyphens (-), but with restrictions (see below).
Length:
The total length of the string must be between 1 and 64 characters.

Not Allowed:

Prefix Restrictions:
The string must not start with:
"xn--" (Reserved for internationalized domain names)
"sthree-"
"sthree-configurator"
Suffix Restrictions:
The string must not end with:
"-s3alias"
"--ol-s3"
Forbidden Character Sequences:
Double dots (..)
Double hyphens (--)
Double underscores (__)
Hyphen followed by a dot (.-)
Dot followed by a hyphen (-.)
Trailing hyphen (-$)
Format Constraints:
Must start with a lowercase letter (a-z) or digit (0-9).
Must end with a lowercase letter (a-z) or digit (0-9).
Can contain hyphens (-), but not at the start or end.

Examples:

Valid Strings:
valid-name
bucket123
abc-def-ghi
a1-b2-c3
simpletest
Invalid Strings:
xn--example (Starts with "xn--")
sthree-example (Starts with "sthree-")
sthree-configurator-test (Starts with "sthree-configurator")
invalid-s3alias (Ends with "-s3alias")
test--name (Contains "--")
double..dot (Contains "..")
bad__underscore (Contains "__")
hyphen-.dot (Contains "-.")
dot-.hyphen (Contains "-.")
trailinghyphen- (Ends with "-")
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.