hey thanks, I'm stil learning regular expressions. Could you tell me what (.+?) does please?
Also, I'm pulling an image from a site but it's only adding the <img src="/path/to/image.jpg"> and so the image doesn't display. I need to manually add the URL infront of it. I'm not sure how to do this within the regular expression.
Not strictly true. By default, . will match any character which isn't the newline character (so the same as [^\n]): any other whitespace character (like space, tab, carriage return) will be matched. With the s (PCRE_DOTALL) modifier, the dot will match any character (including the newline).