Shady
October 31, 2020, 9:07am
1
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?
Try this.
/[\x0400-\x04FF]+/g
/[\x0600-\x06FF]+/g
/[\x0100-\x017F]+/g
Shady
November 1, 2020, 11:24am
3
Hello THank you it’s working but pretty aggressively it takes everything. HAHAHHA
Emily
November 1, 2020, 1:51pm
4
Hey @Shady !
I assume you looked at this post?
Okay, then for Cyrillic use: /[\u0400-\u04FF]+/
And for Arabic use: /[\u0600-\u06FF]+/
To block further sets of ASCII characters, have a look there: Public Unicode Character Map .
And to answer your question, yes, your last \ is likely causing an error, and you don’t need the $ either, also I don’t know what the ~ is doing there. Also the i modifier is to make the comparison case insensitive, so with this parameter you could only have uppercase or lowercase characters instead of the whole set,…
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…
system
Closed
November 15, 2020, 1:51pm
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.