Test, validate and match regular expressions
This regular expression matches standard email addresses while explicitly supporting subdomains in the domain part. The local part allows alphanumeric characters, dots, underscores, and hyphens, provided they are not at the start or end. The domain section supports multiple dot-separated segments, allowing for flexible configurations like user@mail.example.co.uk. It is a useful pattern for validating user input in forms when complex subdomain structures are expected.