What is Regex?
Regex lets you define search patterns that match a wide range of text combinations. This is especially helpful when scammers use unpredictable variations of names or keywords.Want to test your regex? Visit regex101.com
You can paste in your regex pattern and test it against different usernames. It also includes a reference guide.
You can paste in your regex pattern and test it against different usernames. It also includes a reference guide.
Basic Example
/name-filters add regex ^Pascal$
This matches only the exact word Pascal.
^= start of the namePascal= exact characters$= end of the name
PascalIt will not match:
Pascal_, SirPascal, or pascal
Case-Insensitive Example
To make a regex case-insensitive, use(?i) at the beginning:
/name-filters add regex (?i)^Pascal$
This will match:
pascalPascalPASCALpAsCaL
Pascallthis is pascal0xPascal
Recommended Filter Example
/name-filters add regex (?i) bot$
This filter targets any username ending in a space followed by “bot” — a common impersonation tactic.
It will match:
OpenSea BOTAB botDoodles Best Bot
bottombest botsbot(without a space in front)
Note: There is an intentional space in the filter:
(?i) bot$Caution & Best Practices
- Always test your regex on regex101.com before adding it
- Run
/cleanseafter adding a new filter to catch matches already in your server - If you accidentally create an overly broad filter:
- Use
/settings pause pause-state:pauseto stop Hashbot from acting - Remove the problematic filter
- Use
/settings pause pause-state:unpauseto resume normal operation - Cancel any pending
/cleansejobs if needed
- Use
Need Help?
Regex can be tricky. If you’re not confident, join our Support Discord and open a ticket.We’re happy to help build or review filters with you.