{"id":264,"date":"2011-06-09T09:19:12","date_gmt":"2011-06-09T09:19:12","guid":{"rendered":"http:\/\/songoku.homelinux.com\/wordpress\/?p=264"},"modified":"2011-06-09T09:19:12","modified_gmt":"2011-06-09T09:19:12","slug":"validate-email-addresses-using-regular-expressions-rfc-2822","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=264","title":{"rendered":"Validate email addresses using regular expressions (RFC 2822)"},"content":{"rendered":"<p>Hi,<\/p>\n<p>this is for everyone who wants to check for a RFC 2822 compliant email. Here are 2 expressions, one for normal and one for strange looking but valid emails:<\/p>\n<p>$normal = &quot;^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$&quot;;<\/p>\n<p>$strange = &quot;^[a-z0-9,!#\\$%&amp;&#39;\\*\\+\/=\\?\\^_`\\{\\|}~-]+(\\.[a-z0-9,!#\\$%&amp;&#39;\\*\\+\/=\\?\\^_`\\{\\|}~-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,})$&quot;;<\/p>\n<p>source: <a href=\"http:\/\/www.markussipila.info\/pub\/emailvalidator.php\" target=\"_blank\">http:\/\/www.markussipila.info\/pub\/emailvalidator.php<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, this is for everyone who wants to check for a RFC 2822 compliant email. Here are 2 expressions, one for normal and one for strange looking but valid emails: $normal = &quot;^[a-z0-9_\\+-]+(\\.[a-z0-9_\\+-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,4})$&quot;; $strange = &quot;^[a-z0-9,!#\\$%&amp;&#39;\\*\\+\/=\\?\\^_`\\{\\|}~-]+(\\.[a-z0-9,!#\\$%&amp;&#39;\\*\\+\/=\\?\\^_`\\{\\|}~-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2,})$&quot;; source: http:\/\/www.markussipila.info\/pub\/emailvalidator.php<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-264","post","type-post","status-publish","format-standard","hentry","category-programming"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=264"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/264\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}