how to use regular expression for this below stuff in php
<p>I have a database of more than 70000 records and its primary key value started from 1 single digit.</p>

<p>So I want user have to type <code>nm0000001</code> instead of <code>1</code> in url.And in code part I have to discard the rest of the value except <code>1</code>.</p>

<p>But my problem is i want this type of things having 9 letters in the string and the pattern is like this</p>

<pre><code>1    - nm0000001
9    - nm0000009
10   - nm0000010
2020 - nm0002020
</code></pre>

<p>And from the above pattern i want only the digits like <code>1,9,10,2020</code> in php.</p>
