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.
Note that some characters like :, -, @, etc. neither have a special meaning when escaped nor when unescaped. Escape sequences like \:, \-, \@ will be equivalent to their literal, unescaped character equivalents in regular expressions. However, in regular expressions with the unicode flag, these will cause an invalid identity escape error. This is done to ensure backward compatibility with existing code that uses new escape sequences like \p or \k.
but it would be nice if there was an exception handler here.
I started getting error 500 on new posts since a recent update (last week). There were also errors related to emails (in sidekiq, it was watched words related). I only noticed this today. Tried to run an update but the error 500 when posting was still present. The only workaround I’ve found for now is to remove all watched word words.
I cannot reproduce it without any further information. Do you have watched_words_regular_expressions site setting enabled? Can you upload your list of watched words so I can test? Or maybe check your logs (https://your-forum/logs) and post here stack traces that are related to watched words.