I am working on email validations using regular expressions, where I need some fixed email values to validate before proceeding
Here is a clear requirement
User can only have up to 50 character before the Octets (@) and a maximum of 25 characters after the Octets, with a total of 80 characters
I used normal regex to validate email like
let reg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
And now for the above requirement I am trying to create an expression like
let reg = /^\w+([\.-]?(\w{2,50})+)*@(\w{2,25})+([\.-]?\w+)*(\.\w{2,3})+$/;
But it's taking only starting character(not accepting lower than two) and not the last number of requirement, So any help would be appreciated.