# Watched word regular expression crash

**URL:** <https://meta.discourse.org/t/watched-word-regular-expression-crash/275701>\
**Category:** Bug\
**Tags:** watched-words\
**Created:** [August 18, 2023, 1:52pm UTC](https://meta.discourse.org/t/watched-word-regular-expression-crash/275701 "2023-08-18T13:52:36Z")\
**Posts on this page:** 1\
**Showing post:** 23

<div class="post-metadata">

**Author:** ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)\
**Post date:** [November 1, 2023, 7:55pm UTC](https://meta.discourse.org/t/watched-word-regular-expression-crash/275701/23 "2023-11-01T19:55:38Z")

</div>

> [@RGJ](#):
>
> First, an error in a regular expression causes a 500 server error when any post is made.

This has been fixed:

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/4/5/2459a333f816cde3e5a8cf1f038c02f003506e6f.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/2/7/1/27134ec713778f69e3b713470552b7cceb7e3ef8.png)

> [@RGJ](#):
>
> Second, a previously correct regular expression which escapes a dash, is now seen as incorrect. So where `\-` used to work prior to 3.1.0 stable, it now causes a fatal error.

I am currently looking into finding a way to enable the validation of JS regular expressions from the Ruby side. I hope to have a fix ready soon.

---

_[View the full topic](https://meta.discourse.org/t/watched-word-regular-expression-crash/275701)._
