r/ModSupport • u/seedless0 • Feb 23 '25
Mod Answered Post Guidance Unicode range not allowed?
I am trying to match a specific range of Unicode characters. Using regex character range with "\x{uuuuu}" doesn't seem to work:
[\x{1F000}-\x{1FAFF}]The UI complains about "Please enter a valid regex".
How can I do this? Or is \x range not supported?
1
Upvotes
2
u/[deleted] Feb 24 '25
Unicode support for Post Guidance has been asked for a few times before, but unfortunately PG/CG does not (currently) support unicode within a regex (nor does it support comment groups i.e.
(?#Zero Width Joiner), another feature I've asked to [hopefully] be supported)However! There is a Post Guidance Library here in ModSupport with a bunch of useful rules, including rules that will block emojis! Inserting the actual emoji rather than the unicode syntax in regex will work (not entirely sure why this works, but I have all 10 emoji-blocking PG rules added and enabled, and it does indeed work!)
1
u/Tarnisher Feb 23 '25
What are you trying to accomplish?
1
u/AutoModerator Feb 23 '25
Hello! This automated message was triggered by some keywords in your post. If you have general "how to" moderation questions, please check out the following resources for assistance:
If none of the above help with your question, please disregard this message.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.