Ask how to write regular expressions when matching this section.
More
China's artillery forces are the third in the world
What about the head?
The obscenity speed is too fast.
The border army is too hard to support planes
Fierce: our Army's airborne chariot opens fire
Exposure of important components of Indian aircraft carriers
The Sino-Russian anti-terrorism joint show has finally begun.
Our army is so powerful.
People in Okinawa are angry.
US military feared training to protect aircraft carriers
Daily netizens hope that the cloud account will never sink
Japan Quasi-aircraft carrier flight deck exposure
Style 69 is still a powerful tool for our military
What happened to our Army's participating equipment?
Liaonan shipyard is stepping up to build a ship 056
Domestic aircraft carriers are captured by satellites in segments
Our army is equipped with a full range of equipment
Excellent soldiers hit the gun with unfamiliar equipment
Ask me how to write a regular expression that matches the image and text in it.
Reply to discussion (solution)
(.*?) <\/Span>
preg_match_all('#]+src="(.+)">\s*(.+)#isU',$s,$m);print_r($m);
preg_match_all('#]+src="(.+)">\s*(.+)#isU',$s,$m);print_r($m);
Thank you for your enthusiastic reply. The title of the image has been taken out, but the image address has not been provided. could you find a way to retrieve the image address?
Thank you for your help. The regular expression written by jordan102 is correct, because the above test string is sent. what I actually want to test
Is $ str = file_get_contents ("http://mil.news.sina.com.cn"); can such a URL please jordan102
Let's take a look at this.
Thank you for your enthusiastic reply.