找回密码
 加入
搜索
查看: 4089|回复: 15

[AU3基础] [已解决]如何正則提取網頁資料, 並導出到 list view?

  [复制链接]
发表于 2016-9-8 11:23:53 | 显示全部楼层 |阅读模式
本帖最后由 ipmitool 于 2016-9-8 17:53 编辑

如何正則提取網頁資料, 並導出到 list view?

1. 如何提取每一個<div class="st">中間的字</div>

<div class="st">從港英政府開始,新界有所謂“丁屋政策”,是香港新界原居民的男性後人(即男丁)獲准在新界私人土地興建的<b>房屋</b>,為香港殖民地時期沿用至今的一項政策。但不少人卻&nbsp;...</div></td>

2. 如何提取每一個a href="/url?裡面的網址
<a href="/url?q=http://hk.apple.nextmedia.com/news/art/20160908/19764063&amp;sa=U&amp;ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIFigAMAA&amp;usg=AFQjCNEEv4zrKVGvWLdwcHk0OoV0YGPxgw">
<!doctype html><html itemscope="" itemtype="http://schema.org/SearchResultsPage" lang="zh-TW"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/images/branding/googleg/1x/googleg_standard_color_128dp.png" itemprop="image"><link href="/images/branding/product/ico/googleg_lodp.ico" rel="shortcut icon"><title>房屋 source:蘋果 - Google 搜尋</title><style>#gbar,#guser{font-size:13px;padding-top:1px !important;}#gbar{height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}@media all{.gb1{height:22px;margin-right:.5em;vertical-align:top}#gbar{float:left}}a.gb1,a.gb4{text-decoration:underline !important}a.gb1,a.gb4{color:#00c !important}.gbi .gb4{color:#dd8e27 !important}.gbf .gb4{color:#900 !important} </style><style>.star{float:left;margin-top:1px;overflow:hidden}._yhd{font-size:11px}.j{width:34em}#center_col b,#center_col em,#center_col strong,#rhs_block b,#rhs_block em,#rhs_block strong{color:#c03;font-weight:normal}#_AL b{color:#000;font-weight:bold}#center_col a b,#center_col a em,#center_col a strong,#rhs a b,#rhs a em,#rhs a strong{text-decoration:underline}body,td,div,.p,a{font-family:arial,sans-serif;tap-highlight-color:rgba(255,255,255,0)}body{margin:0}a img{border:0}#gbar{float:left;height:22px;padding-left:2px;font-size:13px}.gsfi,.gsfs{font-size:17px}.w,.q:active,.q:visited,.tbotu{color:#11c}a.gl{text-decoration:none}._Umd a:link{color:#0E1CB3}#foot{padding:0 8px}#foot a{white-space:nowrap}h3{font-size:16px;font-weight:normal;margin:0;padding:0}#res h3{display:inline}.hd{height:1px;position:absolute;top:-1000em}.g,body,html,table,.std{font-size:13px}.g{margin-bottom:23px;margin-top:0;zoom:1}ol li,ul li{list-style:none}h1,ol,ul,li{margin:0;padding:0}#mbEnd h2{font-weight:normal}.e{margin:2px 0 0.75em}#leftnav a{text-decoration:none}#leftnav h2{color:#767676;font-weight:normal;margin:0}#nav{border-collapse:collapse;margin-top:17px;text-align:left}#nav td{text-align:center}.nobr{white-space:nowrap}.ts{border-collapse:collapse}.s br{display:none}.csb{display:block;height:40px}.images_table td{line-height:17px;padding-bottom:16px}.images_table img{border:1px solid #ccc;padding:1px}#tbd,#abd{display:block;min-height:1px}#abd{padding-top:3px}#tbd li{display:inline}._ITd,._JTd{margin-bottom:8px}#tbd .tbt li{display:block;font-size:13px;line-height:1.2;padding-bottom:3px;padding-left:8px;text-indent:-8px}.tbos,.b{font-weight:bold}em{font-weight:bold;font-style:normal}.mime{color:#1a0dab;font-weight:bold;font-size:x-small}._lwd{right:-2px !important;overflow:hidden}.soc a{text-decoration:none}.soc{color:#808080}._AC a{text-decoration:none}._AC{color:#808080}._kgd{color:#e7711b}#_vBb{border:1px solid #e0e0e0;margin-left:-8px;margin-right:-8px;padding:15px 20px 5px}._m3b{font-size:32px}._eGc{color:#777;font-size:16px;margin-top:5px}._H0d{color:#777;font-size:14px;margin-top:5px}._HLh{border:1px solid #e0e0e0;padding-left:20px}._Tki{border:1px solid #e0e0e0;padding:5px 20px}#vob{border:1px solid #e0e0e0;padding:15px 15px}#_Nyc{font-size:22px;line-height:22px;padding-bottom:5px}#vob_st{line-height:1.24}._Tsb{border-width:1px;border-style:solid;border-color:#eee;background-color:#fff;position:relative;margin-bottom:26px}._Peb,._Qeb,._Usb{font-family:Arial;font-weight:lighter}._Peb{margin-bottom:5px}._Peb{font-size:xx-large}._Qeb{font-size:medium}._Usb{font-size:small}._Tsb{margin-left:-8px;margin-right:-15px;padding:20px 20px 24px}._rOc{border-spacing:0px 2px}._sOc{max-width:380px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:0px}._v9b{padding-left:15px;white-space:nowrap;color:#666}._pOc{padding-left:0px}._rkc{color:#212121}._HOb{color:#878787}._lMf{color:#093}._jMf{color:#c00}._kMf{padding:1px}._CKg{color:#dd4b39}.gssb_a{padding:0 10px !important}.gssb_c{left:132px !important;right:295px !important;top:78px !important;width:572px !important}.gssb_c table{font-size:16px !important}.gssb_e{border:1px solid #ccc !important;border-top-color:#d9d9d9 !important}.gssb_i{background:#eee !important}#res{padding:0 8px}#rhs_block{padding-top:43px}#_FQd{padding:0 8px}#subform_ctrl{font-size:11px;height:17px;margin:5px 3px 0 17px}.taf{padding-bottom:3px}._chd{padding:20px 0 3px}._bhd{padding:20px 0 3px}#topstuff .e{padding-bottom:6px}.slk .sld{width:250px}.slk{margin-bottom:-3px}.slk ._z3b{padding-bottom:5px;width:250px}._QPd{margin-top:1px;margin-bottom:-11px}._zuc{color:#545454}._Auc{padding-top:2px;padding-bottom:1px}._Buc{padding-top:1px;margin-bottom:14px}.ac,.st{line-height:1.24}.mfr,#ofr{font-size:16px;margin:1em 0;padding:0 8px}._tLi{padding-bottom:25px}.s{color:#545454}.ac,._JEe{color:#545454}a.fl,._cD a,.osl a{color:#1a0dab;text-decoration:none}a:link{color:#1a0dab;cursor:pointer}#tads a:link{color:#1a0dab}#tads .soc a:link{color:#808080}#tads ._AC a:link{color:#808080}._AC a:link{color:#808080}._AC a:visited{color:#808080}._AC a:hover{color:#808080;text-decoration:underline}a:visited{color:#61C}.blg a{text-decoration:none}cite,cite a:link{color:#006621;font-style:normal}#tads cite{color:#006621}.kv{font-size:15px}.kvs{margin-top:1px}.kv,.kvs,.slp{display:block;margin-bottom:1px}.kt{border-spacing:2px 0;margin-top:1px}#mbEnd li{margin:20px 8px 0 0}.f{color:#808080}._pJb{color:#093}h4.r{display:inline;font-size:small;font-weight:normal}.g{line-height:1.2}._sPb{display:inline-block;vertical-align:top;overflow:hidden;position:relative}._Gnc{margin:0 0 2em 1.3em}._Gnc li{list-style-type:disc}.osl{color:#777;margin-top:4px}.r{font-size:16px;margin:0}.spell{font-size:16px}.spell_orig{font-size:13px}.spell_orig a{text-decoration:none}.spell_orig b i{font-style:normal;font-weight:normal}.th{border:1px solid #ebebeb}.ts td{padding:0}.videobox{padding-bottom:3px}.slk a{text-decoration:none}#leftnav a:hover,#leftnav .tbou a:hover,.slk h3 a,a:hover{text-decoration:underline}#mn{table-layout:fixed;width:100%}#leftnav a{color:#222;font-size:13px}#leftnav{padding:43px 4px 4px 0}.tbos{color:#dd4b39}._AEd{border-top:1px solid #efefef;font-size:13px;margin:10px 0 14px 10px;padding:0}.tbt{margin-bottom:28px}#tbd{padding:0 0 0 16px}.tbou a{color:#222}#center_col{border:0;padding:0 8px 0 0}#topstuff .e{padding-top:3px}#topstuff .sp_cnt{padding-top:6px}#ab_name{color:#dd4b39;font:20px "Arial";margin-left:15px}._fld{border-bottom:1px solid #dedede;height:56px;padding-top:1px}#resultStats{color:#999;font-size:13px;overflow:hidden;white-space:nowrap}.mslg>td{padding-right:1px;padding-top:2px}.slk .sld{margin-top:2px;padding:5px 0 5px 5px}._Mvd,.fmp{padding-top:3px}.close_btn{overflow:hidden}#fll a,#bfl a{color:#1a0dab !important;margin:0 12px;text-decoration:none !important}.ng{color:#dd4b39}#mss{margin:.33em 0 0;padding:0;display:table}._mY{display:inline-block;float:left;white-space:nowrap;padding-right:16px}#mss p{margin:0;padding-top:5px}.tn{border-bottom:1px solid #ebebeb;display:block;float:left;height:59px;line-height:54px;min-width:980px;padding:0;position:relative;white-space:nowrap}._UXb,a._UXb{color:#777;cursor:pointer;display:inline-block;font-family:arial,sans-serif;font-size:small;height:54px;line-height:54px;margin:0 8px;padding:0 8px;text-decoration:none;white-space:nowrap}._Ihd{border-bottom:3px solid #dd4b39;color:#dd4b39;font-weight:bold;margin:2px 8px 0}a._Jhd:hover{color:black;text-decoration:none;white-space:nowrap}body{margin:0;padding:0}._sxc{display:inline-block;float:left;margin-top:2px}._Hhd,a._Hhd{margin-left:1px}.sd{line-height:43px;padding:0 8px 0 9px}a:active,.osl a:active,.tbou a:active,#leftnav a:active{color:#dd4b39}#_Xud a:active,#bfl a:active{color:#dd4b39 !important}.csb{background:url(/images/nav_logo229.png) no-repeat;overflow:hidden}.close_btn{background:url(/images/nav_logo229.png) no-repeat -138px -84px;height:14px;width:14px;display:block}.star{background:url(/images/nav_logo229.png) no-repeat -94px -245px;height:13px;width:65px;display:block}.star div,.star span{background:url(/images/nav_logo229.png) no-repeat 0 -245px;height:13px;width:65px;display:block}._nBb{display:inline;margin:0 3px;outline-color:transparent;overflow:hidden;position:relative}._nBb>div{outline-color:transparent}._O0{border-color:transparent;border-style:solid dashed dashed;border-top-color:green;border-width:4px 4px 0 4px;cursor:pointer;display:inline-block;font-size:0;height:0;left:4px;line-height:0;outline-color:transparent;position:relative;top:-3px;width:0}._O0{margin-top:-4px}.am-dropdown-menu{display:block;background:#fff;border:1px solid #dcdcdc;font-size:13px;left:0;padding:0;position:absolute;right:auto;white-space:nowrap;z-index:3}._Ykb{list-style:none;white-space:nowrap}._Ykb:hover{background-color:#eee}a._Zkb{color:#333;cursor:pointer;display:block;padding:7px 18px;text-decoration:none}#tads a._Zkb{color:#333}.sfbgg{background:#f1f1f1;border-bottom:1px solid #e5e5e5;height:71px}#logocont{z-index:1;padding-left:4px;padding-top:4px}#logo{display:block;height:49px;margin-top:12px;margin-left:12px;overflow:hidden;position:relative;width:137px}#logo img{left:0;position:absolute;top:-41px}.lst-a{background:white;border:1px solid #d9d9d9;border-top-color:silver;width:570px}.lst-a:hover{border:1px solid #b9b9b9;border-top:1px solid #a0a0a0;box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.lst-td{border:none;padding:0}.tia input{border-right:none;padding-right:0}.tia{padding-right:0}.lst{background:none;border:none;color:#000;font:16px arial,sans-serif;float:left;height:22px;margin:0;padding:3px 6px 2px 9px;vertical-align:top;width:100%;word-break:break-all}.lst:focus{outline:none}.lst-b{background:none;border:none;height:26px;padding:0 6px 0 12px}.ds{border-right:1px solid #e7e7e7;position:relative;height:29px;margin-left:17px;z-index:100}.lsbb{background-image:-moz-linear-gradient(top,#4d90fe,#4787ed);background-image:-ms-linear-gradient(top,#4d90fe,#4787ed);background-image:-o-linear-gradient(top,#4d90fe,#4787ed);background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#4787ed));background-image:-webkit-linear-gradient(top,#4d90fe,#4787ed);background-image:linear-gradient(top,#4d90fe,#4787ed);border:1px solid #3079ed;border-radius:2px;background-color:#4d90fe;height:27px;width:68px}.lsbb:hover{background-image:-moz-linear-gradient(top,#4d90fe,#357ae8);background-image:-ms-linear-gradient(top,#4d90fe,#357ae8);background-image:-o-linear-gradient(top,#4d90fe,#357ae8);background-image:-webkit-gradient(linear,left top,left bottom,from(#4d90fe),to(#357ae8));background-image:-webkit-linear-gradient(top,#4d90fe,#357ae8);background-color:#357ae8;background-image:linear-gradient(top,#4d90fe,#357ae8);border:1px solid #2f5bb7}.lsb{background:transparent;background-position:0 -343px;background-repeat:repeat-x;border:none;color:#000;cursor:default;font:15px arial,sans-serif;height:29px;margin:0;vertical-align:top;width:100%}.lsb:active{-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.3);box-shadow:inset 0 1px 2px rgba(0,0,0,0.3);background:transparent;color:transparent;overflow:hidden;position:relative;width:100%}.sbico{color:transparent;display:inline-block;height:15px;margin:0 auto;margin-top:2px;width:15px;overflow:hidden}</style><script>(function(){window.google={kEI:'2s_QV8WXIIm50ATWgIPoDw',kEXPI:'750766,2073312,3700258,4003510,4029815,4031109,4032678,4036509,4036527,4038012,4039268,4043492,4045841,4048347,4052811,4054591,4061155,4062702,4062983,4063879,4064815,4065786,4065793,4065959,4066654,4066707,4067860,4068550,4068560,4069462,4069839,4069841,4069907,4070127,4070329,4071230,4071237,4071603,4071845,4072099,4072289,4072364,4072412,4072602,4072774,4073249,4073405,4073418,4073878,4073958,4074558,4074596,4074796,4074801,4075040,4075730,4075790,4075966,4075974,4075982,4076096,4076114,4076303,4076543,4076797,4076931,4076999,4077219,4077221,4077307,4077512,4077780,4077862,4077894,4078175,4078179,4078293,8300096,8300272,8502184,8503210,8503585,8504132,8504846,8505150,8505152,8505276,8505586,8506250,8506255,8506585,8506623,10200083,10201956',authuser:0,kscs:'c9c918f0_24'};google.kHL='zh-TW';})();(function(){google.lc=[];google.li=0;google.getEI=function(a){for(var b;a&&(!a.getAttribute||!(b=a.getAttribute("eid")));)a=a.parentNode;return b||google.kEI};google.getLEI=function(a){for(var b=null;a&&(!a.getAttribute||!(b=a.getAttribute("leid")));)a=a.parentNode;return b};google.https=function(){return"https:"==window.location.protocol};google.ml=function(){return null};google.wl=function(a,b){try{google.ml(Error(a),!1,b)}catch(c){}};google.time=function(){return(new Date).getTime()};google.log=function(a,b,c,e,g){a=google.logUrl(a,b,c,e,g);if(""!=a){b=new Image;var d=google.lc,f=google.li;d[f]=b;b.onerror=b.onload=b.onabort=function(){delete d[f]};window.google&&window.google.vel&&window.google.vel.lu&&window.google.vel.lu(a);b.src=a;google.li=f+1}};google.logUrl=function(a,b,c,e,g){var d="",f=google.ls||"";if(!c&&-1==b.search("&ei=")){var h=google.getEI(e),d="&ei="+h;-1==b.search("&lei=")&&((e=google.getLEI(e))?d+="&lei="+e:h!=google.kEI&&(d+="&lei="+google.kEI))}a=c||"/"+(g||"gen_204")+"?atyp=i&ct="+a+"&cad="+b+d+f+"&zx="+google.time();/^http:/i.test(a)&&google.https()&&(google.ml(Error("a"),!1,{src:a,glmm:1}),a="");return a};google.y={};google.x=function(a,b){google.y[a.id]=[a,b];return!1};google.load=function(a,b,c){google.x({id:a+k++},function(){google.load(a,b,c)})};var k=0;})();(function(){var b=[function(){google.c&&google.tick("load","dcl")}];google.dcl=!1;google.dclc=function(a){google.dcl?a():b.push(a)};function c(){if(!google.dcl){google.dcl=!0;for(var a;a=b.shift();)a()}}window.addEventListener?(document.addEventListener("DOMContentLoaded",c,!1),window.addEventListener("load",c,!1)):window.attachEvent&&window.attachEvent("onload",c);})();</script><script type="text/javascript"></script><script>(function(){var a=function(f){for(var g=f.parentElement,d=null,e=0;e<g.childNodes.length;e++){var h=g.childNodes[e];-1<(" "+h.className+" ").indexOf(" am-dropdown-menu ")&&(d=h)}"none"==d.style.display?(d.style.display="",google.log("hpam","&ved="+f.getAttribute("data-ved"))):d.style.display="none"},b=["google","sham"],c=this;b[0]in c||!c.execScript||c.execScript("var "+b[0]);for(var k;b.length&&(k=b.shift());)b.length||void 0===a?c[k]?c=c[k]:c=c[k]={}:c[k]=a;}).call(window);</script></head><body class="hsrp" bgcolor="#ffffff" marginheight="0" marginwidth="0" topmargin="0"><div id=gbar><nobr><a class=gb1 href="https://www.google.com.tw/search?tab=nw">搜尋</a> <a class=gb1 href="https://www.google.com.tw/search?hl=zh-TW&tbm=isch&source=og&tab=ni">圖片</a> <a class=gb1 href="https://maps.google.com.tw/maps?hl=zh-TW&tab=nl">地圖</a> <a class=gb1 href="https://play.google.com/?hl=zh-TW&tab=n8">Play</a> <a class=gb1 href="https://www.youtube.com/results?gl=TW&tab=n1">YouTube</a> <b class=gb1>新聞</b> <a class=gb1 href="https://mail.google.com/mail/?tab=nm">Gmail</a> <a class=gb1 href="https://drive.google.com/?tab=no">雲端硬碟</a> <a class=gb1 style="text-decoration:none" href="https://www.google.com.tw/intl/zh-TW/options/"><u>更多</u> »</a></nobr></div><div id=guser width=100%><nobr><span id=gbn class=gbi></span><span id=gbf class=gbf></span><span id=gbe></span><a href="http://www.google.com.tw/history/optout?hl=zh-TW" class=gb4>網頁紀錄</a> | <a  href="/preferences?hl=zh-TW" class=gb4>設定</a> | <a target=_top id=gb_70 href="https://accounts.google.com/ServiceLogin?hl=zh-TW&passive=true&continue=https://www.google.com.tw/search%3Fhl%3Dzh-TW%26gl%3Dtw%26authuser%3D0%26tbs%3Dqdr:d%26tbm%3Dnws%26q%3D%25E6%2588%25BF%25E5%25B1%258B%2Bsource:%25E8%2598%258B%25E6%259E%259C" class=gb4>登入</a></nobr></div><div class=gbh style=left:0></div><div class=gbh style=right:0></div><table id="mn" border="0" cellpadding="0" cellspacing="0" style="position:relative"><tr><th width="132"></th><th width="573"></th><th width="278"></th><th></th></tr><tr><td class="sfbgg" valign="top"><div id="logocont"><h1><a href="/webhp?hl=zh-TW" style="background:url(/images/nav_logo229.png) no-repeat 0 -41px;height:37px;width:95px;display:block" id="logo" title="Go to Google Home"></a></h1></div></td><td class="sfbgg" colspan="2" valign="top" style="padding-left:0px"><form style="display:block;margin:0;background:none" action="/search" id="tsf" method="GET" name="gs"><table border="0" cellpadding="0" cellspacing="0" style="margin-top:20px;position:relative"><tr><td><div class="lst-a"><table cellpadding="0" cellspacing="0"><tr><td class="lst-td" width="555" valign="bottom"><div style="position:relative;zoom:1"><input class="lst" value="房屋 source:蘋果" title="搜尋" autocomplete="off" id="sbhost" maxlength="2048" name="q" type="text"></div></td></tr></table></div></td><td><div class="ds"><div class="lsbb"><button class="lsb" value="搜尋" name="btnG" type="submit"><span class="sbico" style="background:url(/images/nav_logo229.png) no-repeat -36px -111px;height:14px;width:13px;display:block"></span></button></div></div></td></tr></table><input name="hl" value="zh-TW" type="hidden"><input name="gl" value="tw" type="hidden"><input name="authuser" value="0" type="hidden"><input name="tbs" value="qdr:d" type="hidden"><input name="tbm" value="nws" type="hidden"></form></td><td class="sfbgg"> </td></tr><tr style="position:relative"><td><div style="border-bottom:1px solid #ebebeb;height:59px"></div></td><td colspan="2"><div class="tn"><div class="_sxc"><a class="_UXb _Jhd _Hhd" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&source=lnms&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0Q_AUIBA">全部</a></div><div class="_sxc"><a class="_UXb _Jhd" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=isch&source=lnms&tbs=qdr:d&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0Q_AUIBQ">圖片</a></div><div class="_sxc"><a class="_UXb _Jhd" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=vid&source=lnms&tbs=qdr:d&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0Q_AUIBg">影片</a></div><div class="_UXb _Ihd _sxc">新聞</div><div class="_sxc"><a class="_UXb _Jhd" href="https://maps.google.com.tw/maps?hl=zh-TW&gl=tw&authuser=0&q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&um=1&ie=UTF-8&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0Q_AUICA">地圖</a></div><div class="_sxc"><a class="_UXb _Jhd" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=bks&source=lnms&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0Q_AUICQ">書籍</a></div></div><div style="border-bottom:1px solid #ebebeb;height:59px"></div></td><td><div style="border-bottom:1px solid #ebebeb;height:59px"></div></td></tr><tbody data-jibp="h" data-jiis="uc" id="desktop-search"><style>._Bu,._Bu a:link,._Bu a:visited,a._Bu:link,a._Bu:visited{color:#808080}._kBb{color:#61C}.ellip{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}</style><tr><td id="leftnav" valign="top"><div><h2 class="hd">Search Options</h2><ul class="med" id="tbd"><li><ul class="tbt"><li class="tbos" id="lr_">網路</li><li class="tbou" id="lr_lang_1zh-CN|lang_1zh-TW"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbs=qdr:d,lr:lang_1zh-CN%7Clang_1zh-TW&tbm=nws&source=lnt&lr=lang_zh-CN%7Clang_zh-TW&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">所有中文網頁</a></li><li class="tbou" id="lr_lang_1zh-TW"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbs=qdr:d,lr:lang_1zh-TW&tbm=nws&source=lnt&lr=lang_zh-TW&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">繁體中文網頁</a></li><li class="tbou" id="ctr_countryTW"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbs=qdr:d,ctr:countryTW&tbm=nws&source=lnt&cr=countryTW&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">國家/地區:台灣</a></li></ul></li><li><ul class="tbt"><li class="tbos" id="nrt_">所有新聞</li><li class="tbou" id="nrt_b"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbs=qdr:d,nrt:b&tbm=nws&source=lnt&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">網誌</a></li></ul></li><li><ul class="tbt"><li class="tbou" id="qdr_"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&tbas=0&source=lnt&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">最近</a></li><li class="tbou" id="qdr_h"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&source=lnt&tbs=qdr:h&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg"> 過去 1 小時</a></li><li class="tbos" id="qdr_d"> 過去 24 小時</li><li class="tbou" id="qdr_w"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&source=lnt&tbs=qdr:w&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg"> 過去 1 週</a></li><li class="tbou" id="qdr_m"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&source=lnt&tbs=qdr:m&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg"> 過去 1 個月</a></li><li class="tbou" id="qdr_y"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&source=lnt&tbs=qdr:y&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg"> 過去 1 年</a></li><li class="tbou" id="ar_1"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&source=lnt&tbs=ar:1&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">封存</a></li></ul></li><li><ul class="tbt"><li class="tbos" id="sbd_">依關聯性排序</li><li class="tbou" id="sbd_1"><a class="q" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbs=qdr:d,sbd:1&tbm=nws&source=lnt&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwUIDg">按日期排序</a></li></ul></li></ul><a class="q" style="padding-left:16px" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&tbas=0&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QuAsIDw">重設工具</a></div></td><td valign="top"><div id="center_col"><div class="sd" id="resultStats">9 項結果</div><div style="background:#ebeff9;padding:8px;margin-bottom:10px;width:549px" id="_AL"><a style="height:14px;margin:0;padding:0;width:14px;float:right" href="/search?q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW&gl=tw&authuser=0&ie=UTF-8&tbm=nws&tbas=0&sa=X&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QuAsIEQ" class="close_btn"></a><b> 過去 24 小時</b></div><div id="res"><div id="topstuff"></div><div id="search"><div id="ires"><ol><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://hk.apple.nextmedia.com/news/art/20160908/19764063&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIFigAMAA&usg=AFQjCNEEv4zrKVGvWLdwcHk0OoV0YGPxgw">要聞港聞- 市民上車難梁特歸咎上屆政府停賣地建屋曾蔭權:當年救 ...</a></h3><div class="slp"><span class="f">香港蘋果日報 - 6 小時前</span></div><div class="st">【本報訊】特首梁振英一直將樓價高企及公營<b>房屋</b>供應不足歸咎於上屆政府<b>房屋</b>政策失當。前特首曾蔭權首度開腔反駁,堅持金融風暴後為挽救樓市而落重藥是正確決定 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://hk.apple.nextmedia.com/news/art/20160908/19764063&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIFzAA&usg=AFQjCNEEv4zrKVGvWLdwcHk0OoV0YGPxgw"><img class="th" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQF2Ob4JUcu-H7xF7gfACKRAIVB5BDb1Xh2JEtAPhovw387ReiygpPl34lLBLPQQWbjlBiFYU4" border="1"></a><div class="f">香港蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://www.appledaily.com.tw/appledaily/article/property/20160908/37375036/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIGSgAMAE&usg=AFQjCNHVjpjgcRzatrajKb0pWjsJpYIcTQ">「信義富邦」每坪358萬榮登北市豪宅王</a></h3><div class="slp"><span class="f">蘋果日報 - 6 小時前</span></div><div class="st">信義<b>房屋</b>不動產企研室專案經理曾敬德表示,此次實價登錄一口氣出現4筆「信義富邦」豪宅交易案,總揭露金額高達19.4億元,其中1筆1樓特殊戶成交5.5億元,扣除 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://news.ltn.com.tw/news/business/breakingnews/1818757&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIGjAB&usg=AFQjCNFqPWLNoYHcehTXaPb0xB2RZoGpCg"><img class="th" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRd0V26GaTKW1RGhTpJWae_y1vEdKdcZIP41nCYAOdJKDVVfB8dGronWCU9V0a13-7Wp1-c4W0" border="1"></a><div class="f">自由時報電子報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://www.appledaily.com.tw/realtimenews/article/new/20160907/944231/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIHCgAMAI&usg=AFQjCNG2QKV2zekgImwBTuWohyQhYqrrxg">【法廣RFI】香港“票王”朱凱迪擔心安全暫住別處</a></h3><div class="slp"><span class="f">蘋果日報 - 15 小時前</span></div><div class="st">從港英政府開始,新界有所謂“丁屋政策”,是香港新界原居民的男性後人(即男丁)獲准在新界私人土地興建的<b>房屋</b>,為香港殖民地時期沿用至今的一項政策。但不少人卻 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://www.appledaily.com.tw/realtimenews/article/new/20160907/944231/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIHTAC&usg=AFQjCNG2QKV2zekgImwBTuWohyQhYqrrxg"><img class="th" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTnAUyt3DrBmnzTu_1IT2PfBpvYwAmlYVWZAPvOFcoTY1PSTMxXnyWMAeV0jawP4oe3-g2WKbY" border="1"></a><div class="f">蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://www.appledaily.com.tw/appledaily/article/headline/20160908/37375235/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIHygAMAM&usg=AFQjCNEhrvFAaTleBnS-mcHbuPF1Lchoeg">居民受夠粉塵噪音店家期待完工商機</a></h3><div class="slp"><span class="f">蘋果日報 - 6 小時前</span></div><div class="st">永慶<b>房屋</b>店面發言人鄭朝鶴認為,大巨蛋若成形,對整體商圈有共榮效益。台灣<b>房屋</b>智庫資深分析師陳炳辰指出,該地段有東區、捷運站、松山文創園區等效益,商圈 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://www.appledaily.com.tw/appledaily/article/headline/20160908/37375235/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIIDAD&usg=AFQjCNEhrvFAaTleBnS-mcHbuPF1Lchoeg"><img class="th" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTsTH6E9TbNKBN7mymgKyCVB247vXoVcLtrD0dUoN6uC0GTsJOUdSJ0RTywPhY89uwNm63nwHjy" border="1"></a><div class="f">蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://www.appledaily.com.tw/realtimenews/article/new/20160907/944206/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIIigAMAQ&usg=AFQjCNGOp4ZQryaqIjQ_U-zjMLOwk814Kg">大雨釀土石崩落砸屋屋主心有餘悸</a></h3><div class="slp"><span class="f">蘋果日報 - 16 小時前</span></div><div class="st">... 警方接獲報案後連夜協助屋主及家屬撤離安置到親友家。56歲屋主羅招成今天返回住家,看到後方的邊坡已危及<b>房屋</b>,部分角落還因此出現大裂縫,令他相當憂心。</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://www.appledaily.com.tw/realtimenews/article/new/20160907/944206/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIIzAE&usg=AFQjCNGOp4ZQryaqIjQ_U-zjMLOwk814Kg"><img class="th" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQdDwUpmETdmmD6BTWVj7OaKz-E_XA4Hx9kTigrJ-7bw2iuiDModOCXGKoICgTBRV4LtzhIhHI" border="1"></a><div class="f">蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://hk.apple.nextmedia.com/financeestate/art/20160908/19763529&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIJSgAMAU&usg=AFQjCNEsN1dNk-mSokhnJm4tnNKb5Vbncg">財經地產- 基金觀點:印尼再起飛</a></h3><div class="slp"><span class="f">香港蘋果日報 - 6 小時前</span></div><div class="st">最近印尼政府宣佈了第13個經濟刺激方案,顯示當局決心以去監管化、鼓勵<b>房屋</b>投資等來推動經濟,而這一次更是集中在低收入人士的<b>房屋</b>政策,令大眾更易「上車」, ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://hk.apple.nextmedia.com/financeestate/art/20160908/19763529&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIJjAF&usg=AFQjCNEsN1dNk-mSokhnJm4tnNKb5Vbncg"><img class="th" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQR45G2sO3KQ4ze7hhM_u-lxn982iN3sabN6B0ERXuOeGGpND3HLo32x84qZMWX6s-BaxM-ipg" border="1"></a><div class="f">香港蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://hk.apple.nextmedia.com/news/art/20160908/19764126&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIKCgAMAY&usg=AFQjCNEjM3A_X8oOQoNdfKj8ujmr3Ge2vw">要聞港聞- 校友宣揚自決遭房署驅趕</a></h3><div class="slp"><span class="f">香港蘋果日報 - 6 小時前</span></div><div class="st">【本報訊】元朗信義中學開學日阻止學生派發港獨傳單,校友本土關注組成員葉健威昨早嘗試於校外嗌咪宣揚自決,卻遭<b>房屋</b>署保安員以活動沒有預先申請為由驅趕;其後 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://hk.apple.nextmedia.com/news/art/20160908/19764126&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIIKTAG&usg=AFQjCNEjM3A_X8oOQoNdfKj8ujmr3Ge2vw"><img class="th" src="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcR7R7DgepeaDEsR8wJD1g1s6vqDq_kPDM60khjOIuKjMr_1ad0T875b_COs-V4ie3toeUL6yA" border="1"></a><div class="f">香港蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://hk.apple.nextmedia.com/realtime/news/20160907/55613761&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIIKygAMAc&usg=AFQjCNHn4dbsN0tVdmJviy2mx9ROCXyrqA">雙失Tree根永續辦事處全靠懶瞓象撐腰</a></h3><div class="slp"><span class="f">香港蘋果日報 - 9 小時前</span></div><div class="st"><b>房屋</b>署亦已為徐物色合適地方另建辦事處,已得徐承諾租用,改建已大致完成,預計可於月內經審批及辦理租賃手續和移交單位。房署指按例當區民選區議員可優先 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://hk.apple.nextmedia.com/realtime/news/20160907/55613761&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIILDAH&usg=AFQjCNHn4dbsN0tVdmJviy2mx9ROCXyrqA"><img class="th" src="https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcQ2alkcay7cnugkhcoKUtgGcphs3hM2yVkigVJnJ5ZZWCGbPCIoA8TR2Acu0OOOY7xnCBViVJQ" border="1"></a><div class="f">香港蘋果日報</div></td></tr></table></div><div class="g"><table><tr><td valign="top" style="width:516px"><h3 class="r"><a href="/url?q=http://www.appledaily.com.tw/realtimenews/article/new/20160907/943934/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QqQIILigAMAg&usg=AFQjCNHst3Q0D2sb4F1pQ-owg1hyjokNTw">綠色集點消費百元可折抵1元現金</a></h3><div class="slp"><span class="f">蘋果日報 - 21 小時前</span></div><div class="st">蕭慧娟表示,目前業者取得碳標籤使用權並沒有補助,明年將訂出補助辦法,另外華航、信義<b>房屋</b>也正向該署申請碳標籤使用權,華航若取得碳標籤使用權,將是國內第 ...</div></td><td valign="top" style="padding:2px 0 0 8px;font-size:77%;text-align:center"><a href="/url?q=http://www.appledaily.com.tw/realtimenews/article/new/20160907/943934/&sa=U&ved=0ahUKEwjF7OC83_7OAhWJHJQKHVbAAP0QpwIILzAI&usg=AFQjCNHst3Q0D2sb4F1pQ-owg1hyjokNTw"><img class="th" src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQmlGBPjmgmNtX2RiGtQOJEQNkSWakJJkOerl4YuHrHoe4HTJeXzQqwMBmzimOgjpu7RCTD-CA" border="1"></a><div class="f">蘋果日報</div></td></tr></table></div></ol></div></div></div></div><div id="foot"><div class="f" style="font-size:10px;padding:16px;text-align:center">以上新聞的選擇和排序均由電腦程式自動決定。 顯示的時間或日期,表示新聞新增到「Google 新聞」或更新的時間。</div><p class="_cD" id="bfl" style="margin:19px 0 0;text-align:center"><a href="http://news.google.com.tw/news/advanced_news_search?hl=zh-TW&gl=tw&authuser=0&q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C">進階搜尋</a><a href="http://news.google.com.tw/news?hl=zh-TW&gl=tw&authuser=0&q=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&um=1&ie=UTF-8&output=rss"><img src="/images/rss.png" style="border:0;margin:1px 3px;vertical-align:text-bottom" alt="RSS" height="12" width="12">RSS </a> <a href="/support/websearch/bin/answer.py?answer=134479&hl=zh-TW">搜尋說明</a> <a href="/tools/feedback/survey/html?productId=196&query=%E6%88%BF%E5%B1%8B+source:%E8%98%8B%E6%9E%9C&hl=zh-TW">提供意見</a></p><div class="_cD" id="fll" style="margin:19px auto 19px auto;text-align:center"><a href="/"> Google 首頁 </a> <a href="/intl/zh-TW/ads">廣告計劃</a> <a href="/intl/zh-TW/policies/privacy/">隱私權</a> <a href="/intl/zh-TW/policies/terms/">服務條款</a> <a href="/intl/zh-TW/about.html">關於 Google</a></div></div></td><td id="rhs_block" valign="top"></td></tr></tbody></table><script type="text/javascript">(function(){var eventid='2s_QV8WXIIm50ATWgIPoDw';google.kEI = eventid;})();</script><script src="/xjs/_/js/k=xjs.hp.en_US.a8ZL0z9oHsI.O/m=sb_he,d/rt=j/d=1/t=zcms/rs=ACT90oEtwAuVGBIK26eCcGKo-FpdnRg-pg"></script><script type="text/javascript">google.ac&&google.ac.c({"agen":true,"cgen":true,"client":"heirloom-serp","dh":true,"dhqt":true,"ds":"n","host":"google.com.tw","isbh":28,"jam":0,"jsonp":true,"msgs":{"cibl":"清除搜尋","dym":"您是不是要查:","lcky":"好手氣","lml":"瞭解詳情","oskt":"輸入工具","psrc":"已從您的「\u003Ca href="/history"\u003E網頁紀錄\u003C/a\u003E」中移除這筆搜尋紀錄","psrl":"移除","sbit":"以圖搜尋","srch":"Google 搜尋"},"nds":true,"ovr":{},"pq":"房屋 source:蘋果","refspre":true,"scd":10,"sce":5,"stok":"AlM81nlx0xBC2QMqu93k8nsZ0bM"})</script><script>(function(){window.google.cdo={height:529,width:575};(function(){var a=window.innerWidth,b=window.innerHeight;if(!a||!b)var c=window.document,d="CSS1Compat"==c.compatMode?c.documentElement:c.body,a=d.clientWidth,b=d.clientHeight;a&&b&&(a!=google.cdo.width||b!=google.cdo.height)&&google.log("","","/client_204?&atyp=i&biw="+a+"&bih="+b+"&ei="+google.kEI);})();})();</script></body></html>
发表于 2016-9-8 11:42:24 | 显示全部楼层
论坛搜索一下 有这方面的咨询
发表于 2016-9-8 11:55:08 | 显示全部楼层
(?<=q=)(.*?)\"

获取网址 练习练习
发表于 2016-9-8 12:28:28 | 显示全部楼层
url\?q=(.+?)".*?st">(.+?)</div
 楼主| 发表于 2016-9-8 13:30:26 | 显示全部楼层
回复 4# haijie1223


    大師, 如果要把網址放第一欄, 內文放第二攔, 這要怎麼處理啊...?
#include <Array.au3>
#include<Inet.au3>



Local $sSource1 = _INetGetSource("https://www.google.com.tw/search?hl=zh-TW&gl=tw&authuser=0&tbs=qdr%3Ad&tbm=nws&q=房屋+source%3A蘋果")
;~MsgBox(0, '源字符串', $sSource)
Local $aSRE1 = StringRegExp($sSource1, 'url\?q=(.+?)".*?st">(.+?)</div', 3)
;If Not @Error Then MsgBox(0, '匹配?量: ' & UBound($aSRE1), '其中[0]元素?: ' & $aSRE1[0])
_ArrayDisplay($aSRE1, UBound($aSRE1))


;Local $sSource2 = _INetGetSource("https://www.google.com.tw/search?hl=zh-TW&gl=tw&authuser=0&tbs=qdr%3Ad&tbm=nws&q=房屋+source%3A蘋果")
;;~MsgBox(0, '源字符串', $sSource)
;Local $aSRE2 = StringRegExp($sSource2, '.*?st">(.+?)</div', 3)
;;If Not @Error Then MsgBox(0, '匹配?量: ' & UBound($aSRE2), '其中[0]元素?: ' & $aSRE2[0])
;_ArrayDisplay($aSRE2, UBound($aSRE2))
发表于 2016-9-8 14:28:57 | 显示全部楼层
回复 5# ipmitool


    你那个网址我这里获取不到,不过单独处理数组的话,下面的代码应该可以。
#include <Array.au3>
#include <Inet.au3>
Local $sSource1 = _INetGetSource("https://www.google.com.tw/search?hl=zh-TW&gl=tw&authuser=0&tbs=qdr%3Ad&tbm=nws&q=房屋+source%3A蘋果")
Local $aSRE1 = StringRegExp($sSource1, 'url\?q=(.+?)".*?st">(.+?)</div', 3)
If Not @error Then
        Local $aNewArray[UBound($aSRE1) / 2][2], $j = 0
        For $i = 0 To UBound($aSRE1) - 1
                If Mod($i, 2) Then
                        $aNewArray[$j][1] = $aSRE1[$i]
                        $j += 1
                Else
                        $aNewArray[$j][0] = $aSRE1[$i]
                EndIf
        Next
        _ArrayDisplay($aNewArray)
Else
        MsgBox(0, 'Error', '@Error=' & @error)
EndIf
 _ArrayDisplay($aSRE1, UBound($aSRE1))
 楼主| 发表于 2016-9-8 14:50:27 | 显示全部楼层
回复 6# haijie1223


    好厲害喔, 那如果要三欄要改哪裡啊?
发表于 2016-9-8 14:59:23 | 显示全部楼层
回复 7# ipmitool


    Local $aNewArray[UBound($aSRE1) / 2][3]

评分

参与人数 1金钱 +20 收起 理由
ipmitool + 20 謝謝你~大師...

查看全部评分

 楼主| 发表于 2016-9-8 15:06:58 | 显示全部楼层
回复 8# haijie1223


    想請問...下面這段, 前面的sa到">要用什麼代碼弄掉啊?
sa=U&amp;ved=0ahUKEwj-yefCmf_OAhXCEpQKHdnNARwQqQIIFigAMAA&amp;usg=AFQjCNGKps8ESyKNCMsFiJKeaXm3IF4Qyg">買到凶宅告不成前屋主他將房子出租反挨告
发表于 2016-9-8 15:15:17 | 显示全部楼层
回复 9# ipmitool


    ConsoleWrite(StringRegExpReplace('sa=U&amp;ved=0ahUKEwj-yefCmf_OAhXCEpQKHdnNARwQqQIIFigAMAA&amp;usg=AFQjCNGKps8ESyKNCMsFiJKeaXm3IF4Qyg">買到凶宅告不成前屋主他將房子出租反挨告', '.*?>', '') & @CRLF)
 楼主| 发表于 2016-9-8 15:54:44 | 显示全部楼层
回复 8# haijie1223


    大師, 想請問, 我改成3欄, 可是第3欄沒有東西噎...看不太懂您的正則, 太高深了, 不知道該怎麼改...可以幫忙˙一下嗎, 謝謝..
#include <Array.au3>
#include <Inet.au3>
Local $sSource1 = _INetGetSource("https://www.google.com.tw/search?hl=zh-TW&gl=tw&authuser=0&tbs=qdr%3Ad&tbm=nws&q=房屋+source%3A蘋果")
Local $aSRE1 = StringRegExp($sSource1, 'url\?q=(.+?)"*&*.(.+?)"*?</a></h3>.*?st">(.+?)</div', 3)

If Not @error Then
        Local $aNewArray[UBound($aSRE1) / 2][3], $j = 0
        For $i = 0 To UBound($aSRE1) - 1
                If Mod($i, 2) Then
                        $aNewArray[$j][1] = $aSRE1[$i]
                        $j += 1

                Else
                        $aNewArray[$j][0] = $aSRE1[$i]
                EndIf
        Next
        _ArrayDisplay($aNewArray)
Else
        MsgBox(0, 'Error', '@Error=' & @error)
EndIf


;_ArrayDisplay($aSRE1, UBound($aSRE1))
发表于 2016-9-8 17:09:57 | 显示全部楼层
回复 11# ipmitool


    是这样吗?
#include <Array.au3>
#include <Inet.au3>
Local $sSource1 = _INetGetSource("https://www.google.com.tw/search?hl=zh-TW&gl=tw&authuser=0&tbs=qdr%3Ad&tbm=nws&q=房屋+source%3A蘋果")
Local $aSRE1 = StringRegExp($sSource1, '(?s)"r">.*?url\?q=(.*?)">(.+?)<.*?st">(.*?)</div', 3)
If Not @error Then
        Local $aNewArray[UBound($aSRE1) / 3][3], $j = 0
        For $i = 0 To UBound($aSRE1) - 4 Step 3
                $aNewArray[$j][0] = $aSRE1[$i]
                $aNewArray[$j][1] = $aSRE1[$i + 1]
                $aNewArray[$j][2] = $aSRE1[$i + 2]
                $j += 1
        Next
        _ArrayDisplay($aNewArray)
Else
        MsgBox(0, 'Error', '@Error=' & @error)
EndIf

评分

参与人数 1金钱 +20 收起 理由
ipmitool + 20 超強!!

查看全部评分

 楼主| 发表于 2016-9-8 17:33:54 | 显示全部楼层
回复 12# haijie1223


你超強的, 最後一個問題了, 第一欄網址的部分, 有共通點, &amp;sa=U&amp, 可以把包含這些字之後的字都拿掉嗎?

為什模這些亂碼在你眼中竟是看得懂的東西, 有甚麼規則嗎?
发表于 2016-9-8 17:36:51 | 显示全部楼层
回复 13# ipmitool
(?s)"r">.*?url\?q=(.*?)&.*?">(.+?)<.*?st">(.*?)</div

评分

参与人数 1金钱 +30 收起 理由
ipmitool + 30 謝謝您~

查看全部评分

 楼主| 发表于 2016-9-8 17:48:19 | 显示全部楼层
回复 14# haijie1223


    好強啊...可以教嗎??? 大師.....
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-28 23:23 , Processed in 0.110479 second(s), 29 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表