title: Regex with ng-if
body: <pre><code>  &lt;div class="row" ng-if="MyTest.Item.MyPassword != MyTest.Item.ConfirmPassword"&gt;
         &lt;div class="col-md-12"&gt;
        &lt;p class="red-color"&gt; Password must be between 4 and 8 digits long and include at least one numeric digit And Passwords must match! &lt;/p&gt;
          &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I need to show the above message when "Mypassword != ConfirmPassword" and the regex '/^(?=.*\d).{4,8}$/' is not fulfilled with the password field.How can I use regex with ng-if ? Any help would be highly appreciated. </p>