Can anybody explain me that mail format code what is happening in that code?

var mailformat = /^\w+([.-]?\w+)@\w+([.-]?\w+)(.\w{2,3})+$/;

Go to link.You can insert your regex and analyze at portions what exactly means each of them

1 Like

Be aware that this RegExp will mark a lot of valid email addresses as invalid (e.g. on .info domains)


An excellent visual explanation of what is happening in that regex is to be found at


This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.