Regex expression to find images

Hi All.

Silly questions, but going to ask it, notwithstanding.

I need to find all of the images on one of my websites so I can migrate it. (Lost alot of the originals when my computer expired).

I have got a regex that works 99% but am having an issue where when I look for the final “.jpg” it fails.
The online regex courses say what I am doing is correct, but I think the difference is that the url return is a mass of text with no real “end of lines” so I can use the $ anchor for the end

Here is my regex string so far:

How do I do the end jpg… or bmp… or gif (you get the general idea).


It would help if you showed one of the lines that failed …

no problem! Happy to oblige

It is nested in a ton of gibberish, so I just selected the line. If you want the gibberish, let me know and you can have that too!


Try this instead


Not at my computer but how do you expect your RegEx to find this if you don’t include the “/“?


On my computer now and have tested it in RegExRX - my RegEx works.

Btw I highly recommend RegExRX (by “Mr. RexEx” Kem Tekiney himself) if you use RegEx more than just once or twice.

Good point. But I don’t think you need to escape the ones inside the square brackets.

(Where’s @Kem_Tekinay )

True. This is enough:


Hi Markus.

Yes I got the RegExRX software, and I built the regex string with it. It seemed to work within the program but when I went and tested with the page as data, it never quite worked.

I am very grateful for the program, but it can’t fix human errors… (grin)

I’ll give this a try and it you don’t hear back from me, “No news is good news”.


Sorry guys. That Regex didn’t work.


To be honest, I doubt that. I rather suspect a copy/paste error.

Tip: if you want help, then put in the effort to give the required information and ideally an example project.

If you do NOT put in the effort, then please don’t expect others to do it for you.

So I am out now as I find it rather annoying to just get tidbits all the time rather than actionable information.


Let’s get some info from you:

Give us some examples of what your html looks like, what you are expecting to get out and the full reflex code you are using.

Hi Markus.

I NEVER expect anyone to do my work.
In the real world this happens to me all the time and I don’t like it either. :smile:

I will try again, and this is what I have copied:

I will try again and advise.

Have a great day and thank you for all of your help so far!


If you aren’t interested in validation, just matching, I’d suggest something simpler:


If you are looking specifically for certain image files, then: