title: Regex to restrict a string for no more than 5 consecutive numeric characters and no more than 8 numeric characters in total
body: <p>I'm trying to build a regex that restricts a string for no more than 5 consecutive numeric characters and no more than 8 numeric characters in total.</p>
  <p>For example :</p>
  <ul>
  <li>12345                      =&gt; True</li>
  <li>Yograj                     =&gt; True</li>
  <li>Yograj123456               =&gt; False</li>
  <li>12345Yograj                =&gt; True</li>
  <li>12345Yograj12345           =&gt; True</li>
  <li>Yograj123456Yograj         =&gt; False</li>
  <li>Yograj123Varsolkar456789   =&gt; False</li>
  <li>123Yograj45678Varsolkar    =&gt; True</li>
  <li>A1B2C3D4e5f6g7h8i9j0       =&gt; False</li>
  <li>Yograj 890 Varsolkar 78455 =&gt; False</li>
  </ul>
  <p>I was able to create this till now:
  /<strong>^((\d{0,5}[a-zA-Z]+\d{0,5})+|\d{0,5})$</strong>/</p>
  <p>Many thanks in advance</p>