It should be ``if (!preg_match(``

The return values of preg_match are

- ``false`` if the regex is invalid
- ``0`` if the regex does not match
- ``1`` if the regex matches