Regular Expressions 101

Discord IP Blocker

Open Workspace
  • Rust
  • Match
2

Regular Expression

r"
\b\d{1,3}[.[^\S\r\n]]+\d{1,3}[.[^\S\r\n]]+\d{1,3}[.[^\S\r\n]]+\d{1,3}
"
gm

Description

Blocks IPs that are sent in discord. Will block any IP, even if the numbers aren't in valid ranges (like 327.19.8.79) Has basic protections against whitespace

Submitted by Bee3D