作者hahehohe (280)
看板Perl
标题[问题] 有关於省略掉空白的问题
时间Sat Mar 12 10:18:25 2011
各位大家好
我想请问个问题
我是要撷取
http://www.weather.com/weather/today/Los+Angeles+CA+90007
天气的资料 像是tempeture condiction等等之类撷取我都可以抓的到
可是当我要抓wind里面的资料时 因为html原始码 wind的资料排版就有很多段行
我目前写的程式码是
if($content=~/<td class=\"twc-col-2 twc-line-wind\">Wind:<br><strong>(.*)
<\/strong>/s)
{
print($1);
print"\n";
}
可是他抓出来的资料都怪怪的
好像一次抓太多了==
我也试过用g可是还是不成功
不知道各位知道我问题出在哪里
谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 198.147.120.127