3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $regex = '/(a[i1l]{2}a|an+u+[s5]|ar+[s5]+[e3]|a[s5]{2,}|ax+w+[o0]+u+n+d|ba+[s5]+t+a+r+d|b[e3]+a+n+[e3]+r|b[i1l]+t+c+h|b[i1l]+[o0]+d+y|b[i1l]+[o0]+w|b[o0]+[l1]{2,}[o0]+[ckx]|b[o0]+n+[e3]|br+(a|[e3]+a+[s5]+t)|bu+g+[e3]+r|bu+t+t|ca+m+[e3]+[i1l]+t+[o0]|ch+[i1l]+n+[ck]|ch+[o0](a+d|d+[e3])|(co|d[iy])[ck]|c[i1l]{2,}t|co+ch|c[o0]{2,}(n|t+[e3i1l])|cr+a+c*k|cr+a+p|cu+m|[ck]un(n[i1l]|t)|d[i1l]+d+[o0]|do+[o0u]+c+h|fa+g|fa+n+n[iy1]|f[e3][i1l]{2,}a+t+[e3]|fu[ck]|ga+y|g[o0]{2,}(ch?|k)|gr+[i1l]+n+g+[o0]|ha+n+d+([i1ly]|j+[o0]+b)|h[i1l]+n+d|h[o0]([e3]|[i1l][e3])|h[o0]+n+k+[e3y]|hu+m+p|j[e3]+(w|r+k)|[gj][i1l]z|ky+k+[e3]|l[e3]+([s5]+b|z)|l[i1l]c+k|mu(ff|[s5]+[i1l]{2,}m)|mu+n+c+h+[e3]|mu+n+g+[i1l]|na+z+[i1l]|n[i1l]+gg|n[ou]+b|pa+k+[i1l]|p[e3]+c+k+[e3]+r|p[i1l]+k+[e3]+y|p[i1l]+[s5]{2,}|p[o0]+r+n|p[o0]{2,}n|pu+s|pu+t+[ao0]|qu[e3]{2,}[fr]|r[i1l]+m+j+[o0]+b|sc+a+t|sh[i1l]+t|sl+a+g|s[i1l]+u+t|st+a+b|su+c?k|ta+r+d|t[i1]t|t[1l]t[st]|tw+a+t|va+g|wa+n+[gk]|w[e3]t+ba[ck]|wh[o0]+r)/i'; $word = 'blah'; if (preg_match($regex, $word)) { echo "fuck"; } else { echo "No swear"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
No swear