This matcher follows the rules given at https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html for legal s3 bucket names (the segment before the first slash if any)