Test, validate and match regular expressions
This regular expression strictly validates email addresses by ensuring the local part (before the @) contains alphanumeric characters separated by approved special symbols like dots, hyphens, and underscores. It prevents these special characters from appearing consecutively or at the beginning and end of the local part. The domain section requires a valid structure including a hostname, optional subdomains separated by hyphens or dots, and a top-level domain of at least two alphabetical characters.