Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

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 - 2 years ago