title: Regex to not match consecutive numbers in a string c#
body: <p>My requirement is to enforce a password policy which contains a rule to not have consecutive numbers i.e. "pass1234","abc12","12tab" etc. should be not allowed. my current regex is:</p>
  
  <pre><code>if(!Regex.IsMatch(password,
                      @"^(?!(?:0(?=1)|1(?=2)|2(?=3)|3(?=4)|4(?=5)|5(?=6)|6(?=7)|7(?=8)|8(?=9)|9(?=0))\d{1,}|(?:0(?=9)|1(?=0)|2(?=1)|3(?=2)|4(?=3)|5(?=4)|6(?=5)|7(?=6)|8(?=7)|9(?=8))\d{1,})[a-zA-Z\d]+$")))
  </code></pre>
  
  <p>But the above regex matches strings that start with numbers i.e. "12abc", "12pass"  but not the strings that contain numbers in between the string like "ab12pass","pass1234" etc.</p>