This line reads like it's a bug. I don't say that lightly. ["preg_match() returns 1 if the pattern matches given subject, 0 if it does not, or FALSE if an error occurred."](http://php.net/manual/en/function.preg-match.php#refsect1-function.preg-match-returnvalues).

The NOT sign in front takes precedence over the `=== false`. That means the following two things:

- `0` and `false` will be transformed to `true`
- `1` will be transformed to `false`

`1` is the actual result you are looking for, as that is the single match you can get with this regular expression. You invert the values and then check against false, rendering `false` as something that is GOOD and `true` that is something BAD.

After figuring all this stuff out, I see you actually do what you meant to do and do a practical `preg_match`. However, if you were to simply cast the return value of