Jump to content

Regex Help

njmyers3
Go to solution Solved by denarced,

I might be able to help but I don't know what kind of regex engine is used in Minecraft chat. If it has all of the fancy features that Perl has then this should work.

I'm working on a chat filter for minecraft and need to stop people from character spamming in the chat. An example of what people type is this: "Heeeeeeeeyyyyyyyyyyyyyy guuuuuuyyyyyyyysssssssssss!!!!!!!!!!!!!!!!!!" I want to limit people to only saying a single character 6 times in a row (aaaaaa) using regex. You can use https://regex101.com/ to help with this but I couldn't figure out exactly how to do this. Here are some examples that would NOT be blocked: "heyyy, wazzzup, !!!!" Here are some examples that WOULD be blocked: "!!!!!!!!!!!!!!,HEYYYYYYYYYYYY,NOOOOOOOOOO" If you can help me with this, I'm sure it's quite simple and I just couldn't find something, I would appreciate it. Thanks!

My main computer:

i7 6700k || GTX 1070 || Asus Z170 RGB || C.M. Hyper 212 EVO || 16GB RAM || 256GB NVMe SSD || 500GB SATA SSD || 12TB total HDD || Define R5 Blackout || 850W PSU

More Details Below :) 

Spoiler

 

CPU: Intel Core i7 6700k                             GPU:  EVGA GTX 1070 FTW                                  |  Motherboard: Asus Z170 Pro Gaming Aura
CPU Cooler: C.M. Hyper 212 EVO             RAM: 16GB Kingston Fury 4x4 DDR4 2400MHz         SSD:  Intel 256GB NVMe SSD & Plextor 500GB SATA SSD

Hard Drive:  WD 2TB Black, 2TB WD Blue, 8TB WD Red     Case:  Fractal Design Define R5 Blackout Edition   PSU:  Be Quiet! Dark Power Pro 11 850W

 

Additional Computer Parts: NZXT Hue for LEDs

Peripherals: Dell U2414H (x2) || Corsair Sabre RGB || Corsair K95 Platinum || Sennheiser 558's || Modmic

 

Pictures of setup:

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I might be able to help but I don't know what kind of regex engine is used in Minecraft chat. If it has all of the fancy features that Perl has then this should work.

i7 3770 | Asus GTX670-DC2-2GD5 | Kingston HyperX Blu 16 GB | Samsung 850 Evo 1TB

 

Fractal Design Define R4 | Nexus RX-8500 850W | Asus P8Z68-V-PRO/GEN3 | 2 x Asus 24.1" PA248Q

 

 

“An expert is a man who has made all the mistakes which can be made, in a narrow field.” – Niels Bohr

 

Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, denarced said:

I might be able to help but I don't know what kind of regex engine is used in Minecraft chat. If it has all of the fancy features that Perl has then this should work.

Thanks, that worked, sorry for late reply.

My main computer:

i7 6700k || GTX 1070 || Asus Z170 RGB || C.M. Hyper 212 EVO || 16GB RAM || 256GB NVMe SSD || 500GB SATA SSD || 12TB total HDD || Define R5 Blackout || 850W PSU

More Details Below :) 

Spoiler

 

CPU: Intel Core i7 6700k                             GPU:  EVGA GTX 1070 FTW                                  |  Motherboard: Asus Z170 Pro Gaming Aura
CPU Cooler: C.M. Hyper 212 EVO             RAM: 16GB Kingston Fury 4x4 DDR4 2400MHz         SSD:  Intel 256GB NVMe SSD & Plextor 500GB SATA SSD

Hard Drive:  WD 2TB Black, 2TB WD Blue, 8TB WD Red     Case:  Fractal Design Define R5 Blackout Edition   PSU:  Be Quiet! Dark Power Pro 11 850W

 

Additional Computer Parts: NZXT Hue for LEDs

Peripherals: Dell U2414H (x2) || Corsair Sabre RGB || Corsair K95 Platinum || Sennheiser 558's || Modmic

 

Pictures of setup:

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×