{"id":2151,"date":"2017-08-21T00:00:00","date_gmt":"2017-08-21T00:00:00","guid":{"rendered":"https:\/\/www.mailboxvalidator.com\/resources3\/articles\/better-than-regular-expression\/"},"modified":"2017-08-21T00:00:00","modified_gmt":"2017-08-21T00:00:00","password":"","slug":"better-than-regular-expression","status":"publish","type":"docs","link":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/","title":{"rendered":"MailboxValidator is better at validating emails compared to regular expressions"},"content":{"rendered":"<div class=\"row\">\n<div class=\"col-md-12\">\n<div class=\"headline\">\n<h2><a href=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-post-mid wp-image-1110\" src=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-600x300.png\" alt=\"MailboxValidator is better at validating emails compared to regular expressions\" width=\"600\" height=\"300\" srcset=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-600x300.png 600w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-300x150.png 300w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-1024x512.png 1024w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-768x384.png 768w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-50x25.png 50w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-920x460.png 920w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-320x160.png 320w, https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better.png 1200w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/h2>\n<h2>Usual solution<\/h2>\n<\/div>\n<p>Ask any programmer the question on how to validate emails and very often the first thing that pops into their minds would be using regular expressions. Regular expression is probably the most common way in any programs to try and match the email address to a specific pattern. The thing is that there are so many combinations of characters that are considered valid for an email address which makes for a monumental task when trying to come up with a regular expression or a series of regular expressions to cover all the cases.<\/p>\n<p>Suffice to say that unless you have studied the RFC standards thoroughly, you would be surprised to find out that the following characters =\/+ are considered valid characters in an email address.<\/p>\n<div class=\"headline\">\n<h2>The MailboxValidator solution<\/h2>\n<\/div>\n<p>Now consider using MailboxValidator&#8217;s email validation service. It not only validates the email address syntax but it also does verifications with the mail servers to check if that email address actually exists. For those of you who are doing email marketing campaigns, it also helps that MailboxValidator has checks for role emails which are normally banned by email sending providers.<\/p>\n<p>In short, you get more bang for your buck when you use MailboxValidator versus trying to just check an email address via regular expressions.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Usual solution Ask any programmer the question on how to validate emails and very often the first thing that pops [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"doc_category":[67],"doc_tag":[],"class_list":["post-2151","docs","type-docs","status-publish","hentry","doc_category-mailboxvalidator-articles"],"year_month":"2026-05","word_count":213,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"mbv_editor","author_nicename":"mbv_editor","author_url":"https:\/\/www.mailboxvalidator.com\/resources\/author\/mbv_editor\/"},"doc_category_info":[{"term_name":"MailboxValidator Articles","term_url":"https:\/\/www.mailboxvalidator.com\/resources\/article-categories\/mailboxvalidator-articles\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MailboxValidator is better at validating emails compared to regular expressions -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MailboxValidator is better at validating emails compared to regular expressions -\" \/>\n<meta property=\"og:description\" content=\"Usual solution Ask any programmer the question on how to validate emails and very often the first thing that pops [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/mailboxvalidator\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@MailBoxV\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/\",\"name\":\"MailboxValidator is better at validating emails compared to regular expressions -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/mbv_articles_img16_mbv_is_better-600x300.png\",\"datePublished\":\"2017-08-21T00:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/mbv_articles_img16_mbv_is_better-600x300.png\",\"contentUrl\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/mbv_articles_img16_mbv_is_better-600x300.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/better-than-regular-expression\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledge Base\",\"item\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/articles\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MailboxValidator is better at validating emails compared to regular expressions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/\",\"name\":\"MailboxValidator Articles\",\"description\":\"MailboxValidator Articles\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#organization\",\"name\":\"MailboxValidator\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/cropped-mailboxvalidator-fb-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/wp-content\\\/uploads\\\/2017\\\/11\\\/cropped-mailboxvalidator-fb-logo.png\",\"width\":1199,\"height\":399,\"caption\":\"MailboxValidator\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mailboxvalidator.com\\\/resources\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/mailboxvalidator\",\"https:\\\/\\\/x.com\\\/MailBoxV\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/mailboxvalidator\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/mailboxvalidator\\\/\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCesIP5V7nXRXthaqdjjfCFg\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MailboxValidator is better at validating emails compared to regular expressions -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/","og_locale":"en_US","og_type":"article","og_title":"MailboxValidator is better at validating emails compared to regular expressions -","og_description":"Usual solution Ask any programmer the question on how to validate emails and very often the first thing that pops [&hellip;]","og_url":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/","article_publisher":"https:\/\/www.facebook.com\/mailboxvalidator","og_image":[{"width":1200,"height":600,"url":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_site":"@MailBoxV","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/","url":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/","name":"MailboxValidator is better at validating emails compared to regular expressions -","isPartOf":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/#primaryimage"},"image":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-600x300.png","datePublished":"2017-08-21T00:00:00+00:00","breadcrumb":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/#primaryimage","url":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-600x300.png","contentUrl":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2020\/01\/mbv_articles_img16_mbv_is_better-600x300.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/better-than-regular-expression\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mailboxvalidator.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Knowledge Base","item":"https:\/\/www.mailboxvalidator.com\/resources\/articles\/"},{"@type":"ListItem","position":3,"name":"MailboxValidator is better at validating emails compared to regular expressions"}]},{"@type":"WebSite","@id":"https:\/\/www.mailboxvalidator.com\/resources\/#website","url":"https:\/\/www.mailboxvalidator.com\/resources\/","name":"MailboxValidator Articles","description":"MailboxValidator Articles","publisher":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mailboxvalidator.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mailboxvalidator.com\/resources\/#organization","name":"MailboxValidator","url":"https:\/\/www.mailboxvalidator.com\/resources\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mailboxvalidator.com\/resources\/#\/schema\/logo\/image\/","url":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2017\/11\/cropped-mailboxvalidator-fb-logo.png","contentUrl":"https:\/\/www.mailboxvalidator.com\/resources\/wp-content\/uploads\/2017\/11\/cropped-mailboxvalidator-fb-logo.png","width":1199,"height":399,"caption":"MailboxValidator"},"image":{"@id":"https:\/\/www.mailboxvalidator.com\/resources\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/mailboxvalidator","https:\/\/x.com\/MailBoxV","https:\/\/www.linkedin.com\/company\/mailboxvalidator\/","https:\/\/www.pinterest.com\/mailboxvalidator\/","https:\/\/www.youtube.com\/channel\/UCesIP5V7nXRXthaqdjjfCFg"]}]}},"_links":{"self":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs\/2151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/comments?post=2151"}],"version-history":[{"count":0,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/docs\/2151\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/media?parent=2151"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/doc_category?post=2151"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.mailboxvalidator.com\/resources\/wp-json\/wp\/v2\/doc_tag?post=2151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}