Here is some examples 158811_23.jpg 151_188.gif
How to match the number between _
and .jpg
?
If you want to match the numbers between _
and .jpg
but exclude the _
and .jpg
then use:
(?<=\_)[0-9]+(?=\.jpg)
(?<=\\_)
is called a lookbehind. Anything after the _
except the _
(?=\\.jpg)
is called a lookahead. Anything before the .jpg
excluding the .jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With