Regex matching a pattern that doesn't include another pattern
<p>I understand the process for a regex that only contains numbers but how would i add another condition to that such that it cannot contain a certain substring. For example, a regex that match input that contains only numbers, but not the substring <code>456</code>.</p>

<p>Given this input (where <code>&lt;empty&gt;</code> is the empty string <code>""</code>):</p>

<pre><code>0
1456
&lt;empty&gt;
12345689
1010101
abc
</code></pre>

<p>These and only these should matche:</p>

<pre><code>0
&lt;empty&gt;
1010101
</code></pre>

<p>Could somebody explain the regex for this? </p>