Changeset 399 for trunk/lib/Email.inc.php
- Timestamp:
- Jun 22, 2012 2:25:43 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Email.inc.php
r396 r399 90 90 // The regex used in validEmail(). Set here instead of in the default _params above so we can use the concatenation . dot. 91 91 // This matches a (valid) email address as complex as: 92 // "Jane & Bob Smith" <bob&smith's/dep=sales!@smith-wick.ca.us > (Sales department)92 // "Jane & Bob Smith" <bob&smith's/dep=sales!@smith-wick.ca.us > (Sales department) 93 93 // ...and something as simple as: 94 94 // x@x.com 95 $this->setParam(array('regex' => '/^(?:(?:"[^"]*?"\s*|[^,@]*)(< )|(?:"[^"]*?"|[^,@]*)\s+|)' // Display name95 $this->setParam(array('regex' => '/^(?:(?:"[^"]*?"\s*|[^,@]*)(<\s*)|(?:"[^"]*?"|[^,@]*)\s+|)' // Display name 96 96 . '((?:[^.<>\s@",\[\]]+[^<>\s@",\[\]])*[^.<>\s@",\[\]]+)' // Local-part 97 97 . '@' // @ … … 102 102 . '[.-]?(?:[A-Z0-9]+[-.])*(?:[A-Z0-9]+\.)+[A-Z]{2,6}))' // FALSE, matches domain name 103 103 . '(?(1)' // Comment conditional for if initial < exists 104 . '(?: >\s*|>\s+\([^,@]+\)\s*)' // TRUE, ensure ending >104 . '(?:\s*>\s*|>\s+\([^,@]+\)\s*)' // TRUE, ensure ending > 105 105 . '|' 106 106 . '(?:|\s*|\s+\([^,@]+\)\s*))$/i')); // FALSE ensure there is no ending >
Note: See TracChangeset
for help on using the changeset viewer.