fix regex in case with the image not wrapped in a tags but followed by an a tag