'; preg_match( '@src="([^"]+)"@' , $html, $match ); $src = array_pop($match); // will return /images/image.jpg echo $src;