I am trying to form a regex for below lines so that it returns the name of the image. I have multiple image formats. The image formats that it has to return are jpg, png, PNG, jpeg, JPG.
For example, for the first line it should return me, the image's name -- test-hire-logo.png.
I've tried below regex , but it will only matches png type only.
([^\/]+)\.(png)
/content/dam/thesis/company-png/test-hire-logo.png.imgw.850.x.jpg
/content/dam/thesis/company/instance-hire-logo.jpg
/content/dam/thesis/company/testing hire.jpg