title: How can I check if preg_match() is False instead of True?
body: <p>I have this code which makes sure that the username is only letters and numbers. But the way my code is set up, I need it to check if the result of <a href="https://www.php.net/manual/en/function.preg-match.php" rel="nofollow noreferrer">preg_match</a> is <code>false</code>.</p>
  <p>Right now it says &quot;if secure echo this&quot;. I need its logic to say &quot;if not secure say this&quot;. How can I do it?</p>
  <pre><code>if (preg_match('/[A-Z]+[a-z]+[0-9]+/', $username))
  {
      echo 'Secure enough';
  }
  </code></pre>