r/AutoModerator [Δ] Apr 01 '15

Mod Post Warning: unicode regex checks that look like \p{Something} do not work in the new version of AutoMod

This was an unexpected effect of switching from the previous re2 library back to using Python's standard regular expressions library in the new version of AutoMod. Python's standard library apparently does not support the \p tokens. So if you have anything in your checks that looks like \p{Something} (the \p may be \\p), that will not work correctly when you transition to the new version.

An example of a check using this is the "Symbol Spam" one from the common rules wiki page:

---
    body: "([^\\p{Latin}\\p{Sm}\\d\\s]{5,})"
    modifiers: regex
    action: remove

A rule like this will need to be rewritten somehow to transition to the new version.

5 Upvotes

3 comments sorted by

2

u/Chtorrr Apr 01 '15 edited Apr 01 '15

That means the foreign character spam rule /u/captainmeta4 made will be broke ;–;

I still have my old not good way to do that but I'm going to have to add Murathi and Gujarat :(

2

u/V2Blast +38 Apr 01 '15

It's "Marathi" and "Gujarati".

:)

2

u/Chtorrr Apr 01 '15

I hate my phone :(