{"id":78,"date":"2009-03-11T00:51:26","date_gmt":"2009-03-10T22:51:26","guid":{"rendered":"http:\/\/www.cetinkoca.com\/blog\/?p=78"},"modified":"2009-03-11T00:51:26","modified_gmt":"2009-03-10T22:51:26","slug":"regular-mess","status":"publish","type":"post","link":"https:\/\/www.cetinkoca.com\/blog\/regular-mess\/","title":{"rendered":"Regular Mess"},"content":{"rendered":"<p>Regular expressions can actually be quite messy. Don&#8217;t you think so? Well, think not before you see this&#8230;<!--more--><\/p>\n<p>Below is a <a href=\"http:\/\/ex-parrot.com\/~pdw\/Mail-RFC822-Address.html\" target=\"_blank\">regular expression<\/a> used to validate email addresses according to the <a href=\"http:\/\/www.ietf.org\/rfc\/rfc0822.txt?number=822\" target=\"_blank\">RFC 822<\/a> grammar. I just encountered this while browsing web today. Seriously, what the hell?<\/p>\n<blockquote><p><code>(?:(?:rn)?[ t])*(?:(?:(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t]<br \/>\n)+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:<br \/>\nrn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(<br \/>\n?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[<br \/>\nt]))*\"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u0000<br \/>\n31]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*<br \/>\n](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+<br \/>\n(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:<br \/>\n(?:rn)?[ t])*))*|(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z<br \/>\n|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)<br \/>\n?[ t])*)*&lt;(?:(?:rn)?[ t])*(?:@(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:<br \/>\nrn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[<br \/>\nt])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)<br \/>\n?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t]<br \/>\n)*))*(?:,@(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[<br \/>\nt])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*<br \/>\n)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t]<br \/>\n)+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*)<br \/>\n*:(?:(?:rn)?[ t])*)?(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+<br \/>\n|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:r<br \/>\nn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:<br \/>\nrn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t<br \/>\n]))*\"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031<br \/>\n]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](<br \/>\n?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?<br \/>\n:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?<br \/>\n:rn)?[ t])*))*&gt;(?:(?:rn)?[ t])*)|(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?<br \/>\n:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?<br \/>\n[ t]))*\"(?:(?:rn)?[ t])*)*:(?:(?:rn)?[ t])*(?:(?:(?:[^()&lt;&gt;@,;:\\\".[]<br \/>\n\u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|<br \/>\n\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;<br \/>\n@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"<br \/>\n(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t]<br \/>\n)*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\<br \/>\n\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?<br \/>\n:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[<br \/>\n]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*|(?:[^()&lt;&gt;@,;:\\\".[] \u000000-<br \/>\n\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(<br \/>\n?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*)*&lt;(?:(?:rn)?[ t])*(?:@(?:[^()&lt;&gt;@,;<br \/>\n:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([<br \/>\n^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\"<br \/>\n.[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[<br \/>\n]r\\]|\\.)*](?:(?:rn)?[ t])*))*(?:,@(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".<br \/>\n[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]<br \/>\nr\\]|\\.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[]<br \/>\n\u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]<br \/>\n|\\.)*](?:(?:rn)?[ t])*))*)*:(?:(?:rn)?[ t])*)?(?:[^()&lt;&gt;@,;:\\\".[] \u0000<br \/>\n00-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\<br \/>\n.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,<br \/>\n;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|\"(?<br \/>\n:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*))*@(?:(?:rn)?[ t])*<br \/>\n(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".<br \/>\n[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t])*(?:[<br \/>\n^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]<br \/>\n]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*&gt;(?:(?:rn)?[ t])*)(?:,s*(<br \/>\n?:(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\<br \/>\n\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*)(?:.(?:(<br \/>\n?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[<br \/>\n[\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t<br \/>\n])*))*@(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t<br \/>\n])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?<br \/>\n:.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|<br \/>\nZ|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*|(?:<br \/>\n[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[<br \/>\n]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*)*&lt;(?:(?:rn)<br \/>\n?[ t])*(?:@(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"<br \/>\n()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)<br \/>\n?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;<br \/>\n@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*(?:,@(?:(?:rn)?[<br \/>\nt])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,<br \/>\n;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?:.(?:(?:rn)?[ t]<br \/>\n)*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\<br \/>\n\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*)*:(?:(?:rn)?[ t])*)?<br \/>\n(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[\"()&lt;&gt;@,;:\\\".<br \/>\n[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])*)(?:.(?:(?:<br \/>\nrn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z|(?=[[<br \/>\n\"()&lt;&gt;@,;:\\\".[]]))|\"(?:[^\"r\\]|\\.|(?:(?:rn)?[ t]))*\"(?:(?:rn)?[ t])<br \/>\n*))*@(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])<br \/>\n+|Z|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*)(?:<br \/>\n.(?:(?:rn)?[ t])*(?:[^()&lt;&gt;@,;:\\\".[] \u000000-\u000031]+(?:(?:(?:rn)?[ t])+|Z<br \/>\n|(?=[[\"()&lt;&gt;@,;:\\\".[]]))|[([^[]r\\]|\\.)*](?:(?:rn)?[ t])*))*&gt;(?:(<br \/>\n?:rn)?[ t])*))*)?;s*)<\/code><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Regular expressions can actually be quite messy. Don&#8217;t you think so? Well, think not before you see this&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[2,4],"tags":[40,41,43],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5z32a-1g","_links":{"self":[{"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/posts\/78"}],"collection":[{"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":0,"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cetinkoca.com\/blog\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}