improved img tag regex so that it matches in more situations