3 # Tests to make sure the regexp engine doesn't run into limits too soon.
15 (?<address> (?&mailbox) | (?&group))
16 (?<mailbox> (?&name_addr) | (?&addr_spec))
17 (?<name_addr> (?&display_name)? (?&angle_addr))
18 (?<angle_addr> (?&CFWS)? < (?&addr_spec) > (?&CFWS)?)
19 (?<group> (?&display_name) : (?:(?&mailbox_list) | (?&CFWS))? ;
21 (?<display_name> (?&phrase))
22 (?<mailbox_list> (?&mailbox) (?: , (?&mailbox))*)
24 (?<addr_spec> (?&local_part) \@ (?&domain))
25 (?<local_part> (?&dot_atom) | (?"ed_string))
26 (?<domain> (?&dot_atom) | (?&domain_literal))
27 (?<domain_literal> (?&CFWS)? \[ (?: (?&FWS)? (?&dcontent))* (?&FWS)?
29 (?<dcontent> (?&dtext) | (?"ed_pair))
30 (?<dtext> (?&NO_WS_CTL) | [\x21-\x5a\x5e-\x7e])
32 (?<atext> (?&ALPHA) | (?&DIGIT) | [!#\$%&'*+-/=?^_`{|}~])
33 (?<atom> (?&CFWS)? (?&atext)+ (?&CFWS)?)
34 (?<dot_atom> (?&CFWS)? (?&dot_atom_text) (?&CFWS)?)
35 (?<dot_atom_text> (?&atext)+ (?: \. (?&atext)+)*)
37 (?<text> [\x01-\x09\x0b\x0c\x0e-\x7f])
38 (?<quoted_pair> \\ (?&text))
40 (?<qtext> (?&NO_WS_CTL) | [\x21\x23-\x5b\x5d-\x7e])
41 (?<qcontent> (?&qtext) | (?"ed_pair))
42 (?<quoted_string> (?&CFWS)? (?&DQUOTE) (?:(?&FWS)? (?&qcontent))*
43 (?&FWS)? (?&DQUOTE) (?&CFWS)?)
45 (?<word> (?&atom) | (?"ed_string))
49 (?<FWS> (?: (?&WSP)* (?&CRLF))? (?&WSP)+)
50 (?<ctext> (?&NO_WS_CTL) | [\x21-\x27\x2a-\x5b\x5d-\x7e])
51 (?<ccontent> (?&ctext) | (?"ed_pair) | (?&comment))
52 (?<comment> \( (?: (?&FWS)? (?&ccontent))* (?&FWS)? \) )
53 (?<CFWS> (?: (?&FWS)? (?&comment))*
54 (?: (?:(?&FWS)? (?&comment)) | (?&FWS)))
56 # No whitespace control
57 (?<NO_WS_CTL> [\x01-\x08\x0b\x0c\x0e-\x1f\x7f])
75 print /^$email$/ ? "ok " : "not ok ", ++ $count, "\n";
79 # Acme::MetaSyntactic ++
82 Jeff_Tracy@thunderbirds.org
83 "Lady Penelope"@thunderbirds.org
84 "The\ Hood"@thunderbirds.org
85 fred @ flintstones.net
86 barney (rubble) @ flintstones.org
87 bammbamm (bam! bam! (bam! bam! (bam!)) bam!) @ flintstones.org
88 Michelangelo@[127.0.0.1]
89 Donatello @ [127.0.0.1]
90 Raphael (He as well) @ [127.0.0.1]
91 "Leonardo" @ [127.0.0.1]
92 Barbapapa <barbapapa @ barbapapa.net>
93 "Barba Mama" <barbamama @ [127.0.0.1]>
94 Barbalala (lalalalalalalala) <barbalala (Yes, her!) @ (barba) barbapapa.net>