日期:2014-05-19  浏览次数:21009 次

正则表达式,过长问题.
@ " <span[^> ]*?> \S+ </span> \s+ </td> <td[^> ]*?> \s+ <span[^> ]*?> (? <area> [^ <]*?) </span> \s+ </td> <td[^> ]*?> \s+ <span[^> ]*?> (? <type> \b{1}) </span> \s+ </td> <td[^> ]*?> \s+ <span[^> ]*?> (? <price> )[^ <]*?) </span> \s+ </td> <td[^> ]*?> \s+ <span[^> ]*?> (? <num> [^ <]*?) </span> \s+ </td> <td[^> ]*?> \s+ <span[^> ]*?> (? <state> [^ <]*?) </span> ";


源码:
<tr>
<td   align= "center "   style= "width:120px; ">
                                              <span   id= "Allyxlb1_StockList_ctl04_Label33 "> 英区 </span>
                                      </td> <td   align= "center "   style= "width:180px; ">
                                              <span   id= "Allyxlb1_StockList_ctl04_Label3 "> Darkmoon   Faire </span>
                                      </td> <td   align= "center ">
                                              <span   id= "Allyxlb1_StockList_ctl04_Label4 "> A </span>
                                      </td> <td   align= "center ">
                                              <span   id= "Allyxlb1_StockList_ctl04_Label5 "> 0.17元/G </span>
                                      </td> <td   align= "center ">
                                              <span   id= "Allyxlb1_StockList_ctl04_Label2 "> 780 </span>
                                      </td> <td   align= "center ">
                                              <span   id= "Allyxlb1_StockList_ctl04_Label1 "> 正常 </span>
                                      </td> <td   align= "center ">
                                              <input   type= "image "   name= "Allyxlb1$StockList$ctl04$ImageButton1 "   id= "Allyxlb1_StockList_ctl04_ImageButton1 "   src= "skin/cart.gif "   onclick= "javascript:WebForm_DoPostBackWithOptions(new   WebForm_PostBackOptions(&quot;Allyxlb1$StockList$ctl04$ImageButton1&quot;,   &quot;&quot;,   false,   &quot;&quot;,   &quot;UserOrder.aspx?ServerID=93&quot;,   false,   false)) "   style= "border-width:0px; "   />