I have a string with multiple URLs and other content in it.
I have URLs in following format:
http://www.example.com/bla1/bla2/thumb_my-file-name(2).JPG
The part till http://www.example.com/bla1/bla2/thumb_
is fixed.
However, I dont know what will be: my-file-name(2)
. I know it will be ending with .JPG
So far, I'm using the following regex to detect them:
/http:\/\/www.example.com\/bla1\/bla2\/thumb_/g
and I have also used \.JPG
to detect the end.
But how do I capture the middle part as well? How do I catch this whole URL?