# 如何防止论坛出现大量垃圾邮件机器人？

**URL:** <https://meta.discourse.org/t/how-to-prevent-an-influx-of-spam-bots-on-our-forum/382459>\
**Category:** Support\
**Tags:** spam\
**Created:** [2025年九月12日 16:50 UTC](https://meta.discourse.org/t/how-to-prevent-an-influx-of-spam-bots-on-our-forum/382459 "2025-09-12T16:50:04Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [2025年九月12日 17:21 UTC](https://meta.discourse.org/t/how-to-prevent-an-influx-of-spam-bots-on-our-forum/382459/4 "2025-09-12T17:21:02Z")

</div>

我明白了，我们可以想出一些更具体的方法来避免较短的代码……也许是：

```plaintext
\b\d{3}[-.\s]\d{3}[-.\s]\d{4}\b

```

这将匹配 `1-800-123-4567`、`123 456 7890` 等格式。

如果更像是 `+1 123 456 7890`，这可能更适合专门匹配 `+1`。

```plaintext
\+1[-.\s]\d{3}[-.\s]\d{3}[-.\s]\d{4}

```

这些都不太可能误报像 123-4567 这样较短的代码。

---

_[View the full topic](https://meta.discourse.org/t/how-to-prevent-an-influx-of-spam-bots-on-our-forum/382459)._
