Blocking certain languages

Asked Oct 31, 2020·3 replies·Last activity 5 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

Hello,
I know this has been posted before, but I'm kind of having a hardt time getting it to work properly. I'm using Nightbot in a youtube live chat, and I want to block certain languages.
I've added the following lines to the Blacklist word/phrases
[\x0400-\x04FF]+
[\x0600-\x06FF]+
[\x0100-\x017F]+

But it does not seem to work.
Am I missing something?

3 replies

Try this.
/[\x0400-\x04FF]+/g
/[\x0600-\x06FF]+/g
/[\x0100-\x017F]+/g

Hello :D THank you :D it's working but pretty aggressively it takes everything. HAHAHHA

Hey @Smart Narwhal!

I assume you looked at this post?
/t/block-specific-languages-with-regexp/1534604042192425151#m1534604047053750274

I didn't get a reply from the person who was asking for it at the time so I didn't know if it actually worked.

Have you made sure to set every RegExp on a separate line?

If yes and it's not working, may I suggest replacing the x with a u, so like this:

/[\u0400-\u04FF]+/
/[\u0600-\u06FF]+/
/[\u0100-\u017F]+/

It may be the mistake I've done at the time...