Difference between revisions of "Regexp:Email"

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Regexp
 
{{Regexp
 
|id=Email
 
|id=Email
|regexp=<nowiki>(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])</nowiki>
+
|regexp=/^([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)@(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})$/
|message=Must be a valid e-mail address}}
+
|message=Must be a valid e-mail address
 
+
}}
{{#show: {{PAGENAMEE}}|?Regexp regexp}}
+
The regexp is taken from https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript and the pipe char is replaced by the default [[Property:Regexp or char]] !.

Latest revision as of 11:41, 1 March 2021

id Email
regexp /^([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)@(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})$/
base type
inverse
message Must be a valid e-mail address
or char
base prefix

Regexp

The regexp is taken from https://stackoverflow.com/questions/46155/how-to-validate-an-email-address-in-javascript and the pipe char is replaced by the default Property:Regexp or char !.