Description
^https:\/\/[^\/]+\/([^.]*)\.jpg

This expression will do the following:
- find the subpage and filename from the given link, assuming the filename is a jpg
Example
Live Demo
https://regex101.com/r/nZ7eX7/1
Sample text
https://mydomainname.net/productimages/1679/T716AP1_lg.jpg?w=125&h=125&tstamp=05/19/2016%2015:08:30
Sample Matches
productimages/1679/T716AP1_lg
Explanation
NODE EXPLANATION
----------------------------------------------------------------------
^ the beginning of the string
----------------------------------------------------------------------
https: 'https:'
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
[^\/]+ any character except: '\/' (1 or more
times (matching the most amount possible))
----------------------------------------------------------------------
\/ '/'
----------------------------------------------------------------------
( group and capture to \1:
----------------------------------------------------------------------
[^.]* any character except: '.' (0 or more
times (matching the most amount
possible))
----------------------------------------------------------------------
) end of \1
----------------------------------------------------------------------
\.jpg '.jpg'
----------------------------------------------------------------------