Regular Expressions 101

Regex to flag the word "pharmafia"

Open Workspace
  • Python
  • Match
0

Regular Expression

r"
^[p][h][4a][r][_\-]?[m][4a][f][i1][4a]$
"
gmi

Description

Useful for forum moderators looking to flag variations of the word "pharmafia" in comments. captures the following variations: pharmafia ph4rm4f14 phar_mafia phar-mafia

Submitted by tychopotts