How to retrieve a number (ID) inside a image path using js/jquery?
<p>Here is the sample path, assuming the format is fixed</p>

<p>For the 4th image, the path is '<code>demo/medium/Web081112_P004_medium.jpg</code>' </p>

<p>so if the image is the 100 th ,then   </p>

<p>'<code>demo/medium/Web081112_P100_medium.jpg</code> '</p>

<p>Is there any way to get the number in this format, I have thought about using reg exp? But it may cause a problem because I may retrieve 004 instead of 4, how to fix this? Thanks</p>
