我有這一塊的HTML代碼:JavaScript的正則表達式需要
<tr class="AttCardFooter" onMouseOver="this.style.backgroundColor='#E1EAFE'" onMouseOut="this.style.backgroundColor='Transparent'">...etc etc.. new lines etc.. <td title="Saldo+">33:33</td><td title="Saldo-">22:22</td> .. etc etc...
我需要的JavaScript正則表達式,將抓住這兩個領域33:33和22:22 所有這一切我都試過因爲新行字符失敗。 如果有人知道如何做到這一點,我將非常感激。
使用正則表達式來解析HTML通常被認爲是一個壞主意。我建議你使用類似xpath的東西來代替。 https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript – 2012-04-02 19:06:12
需要對有多少JavaScript正則表達式問題關於解析HTML進行計數。 – maerics 2012-04-02 19:18:11