# Blocking email addresses using profanity filter?

**URL:** <https://meta.discourse.org/t/blocking-email-addresses-using-profanity-filter/39759>\
**Category:** Product Support\
**Created:** [February 17, 2016, 10:42pm UTC](https://meta.discourse.org/t/blocking-email-addresses-using-profanity-filter/39759 "2016-02-17T22:42:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)\
**Post date:** [February 18, 2016, 1:51am UTC](https://meta.discourse.org/t/blocking-email-addresses-using-profanity-filter/39759/6 "2016-02-18T01:51:20Z")

</div>

Fair enough, but the filter already exists in Discourse, even if you aren’t using it personally. Also, keep in mind (in response to your blog post) that the Discourse filter doesn’t replace strings, it masks them with squares. 🙂

Regexes are inherently difficult, so I’m not necessarily proposing that you ask everyday users to use them as the mainstream use case. The current system works fine for most cases, but there’s no way to surefire way prevent people from posting most common email addresses. (I am not interested in the debate on the “perfect” email regex.)

Meanwhile, I’m simply blocking some of the most common domain names like `@gmail.com`, `@yahoo.com`, etc.

> [@Mittineague](#):
>
> And as for a valid email regex, it is notoriously difficult to craft a fool-proof one. Many come close and are “good enough” but without additional processing there will likely be problems at some point.

I am not interested in letting perfect get in the way of good here. Just trying to prevent the most common occurrences.

---

_[View the full topic](https://meta.discourse.org/t/blocking-email-addresses-using-profanity-filter/39759)._
