# 如果主题标题包含今天的日期，则自动提升该话题

**URL:** <https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197>\
**Category:** Feature\
**Tags:** auto-bump\
**Created:** [2017 年5 月 5 日 21:10 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197 "2017-05-05T21:10:29Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
发布日期： [2017 年5 月 8 日 20:19 UTC](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197/11 "2017-05-08T20:19:48Z")

</div>

> [@sam](#):
>
> “Feb 11”

That’s the _only_ format I would suggest supporting. Unique enough to not be accidental. The year could be optional, we assume current year unless 4-digit year is provided, e.g.

> Feb 11, 2018  
> Feb 11 2018  
> Jan 30  
> Mar 3

So the regex would be

`((Jan|Feb|Mar|Apr|May|June?|July?|Aug|Sep|Oct|Nov|Dec)\s\d{1,2})(,?\s\d{4})?`

And that matches like so

 ![](https://global.discourse-cdn.com/meta/original/3X/6/0/60b398795ffc82233f298e00837340f1eadd39de.png)

---

_[View the full topic](https://meta.discourse.org/t/auto-bump-a-topic-if-its-title-contains-todays-date/62197)._
