I have a Regex email validation pattern:
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i
My task is to adjust this pattern to comply with RFC 5321 standards, meaning not more than more than 64 characters in the local part and not more than 255 characters in the domain part. Currently, the pattern validates much longer emails.
My question is how is t possible to restrict the length of the local part (prior to @ sign) to max 64 chars, and the domain part (after the @ sign) to max 255 chars.