Look at the input you posted, then look at your first regular expression. If it helps, print the input and use a highlighter to mark what you think is being matched. Now, add a print statement and print $1. Was it what you thought it was? Think about why not.

Now compare your regular expression with the one in the first code snipped I posted. How is it different? Can you guess by looking at it what it will match?

I expect to get all of the html that matches the regex but I only get the first html that does. Wich is an image.

I compared it with your code. I can't figure out why either of the codes didn't get the results I expected.

I think I know what the code will do before running it because I understand all of the functions and symbols.

But when I run it I'm wrong. Then I'm lost because I don't beleive that logistics are being applied. But that's not possible. Now i have no theory why I'm not getting what the code clearly demands and I think that there is some other circumstance is interfering with my programm. It's a fairly simple program and with that now in mind I don't beleive it's likley that another circumstance could cause a problem, but only my code.

I hope when I write my spider that I won't have the same problems getting all of the links off of the page. (Similar to this program.)

Well, I'm stumped. My program isn't longer than a page view and I see nothing that could be causing a problem, or is not correct. Your code looks like it should work. And so does mine.

I Thank you For your help. I'm sure if you were here you could figure it out but your not so I'll have to find an alternative or just forget my spider.