title: How to select any number of digits with regex?
body: <p>I'm trying to write a regex that will extract the numbers after <code>directory/</code> in the following URL:</p>
  
  <pre><code>http://www.website.com/directory/9892639512/alphanum3r1c/some-more-text-here/0892735235
  </code></pre>
  
  <p>If I know the number of digits, then this regex I wrote works:</p>
  
  <pre><code>directory\/([0-9]{7})\/
  </code></pre>
  
  <p>However, if I remove the number of digits to match <code>{7}</code>, then the regex stops working.</p>
  
  <p>Live demo: <a href="http://regex101.com/r/wX3eI2" rel="noreferrer">http://regex101.com/r/wX3eI2</a></p>
  
  <p>I've been trying different, things, but can't seem to get the regex to work without explicitly setting the number of characters to match.</p>
  
  <p>How can I get this working?</p>