我有這樣的HTML代碼正則表達式用vb.net
<div class="name">
<span id="businessNumOnMap2" class="resultNumberOnMap" style="display:none;">2</span>
<span>
<a href="/len/aapproximatch%20search/284096.php" onclick="loadBusinessInfo('1', '284096'); return false;" class="businessName">Bangsar Seafood Garden Restaurant</a></span><span id="phoneSpan1"></span>
<script type="text/javascript">
var d=document.getElementById('phoneSpan1');d.innerHTML+='0';d.innerHTML+='3';d.innerHTML+=0?'8':'-';d.innerHTML+=1?'2':'1';d.innerHTML+='2';d.innerHTML+=1?'8':'1';d.innerHTML+=0?'0':'2';d.innerHTML+='2';d.innerHTML+=0?'4':'5';d.innerHTML+='5';d.innerHTML+=1?'5':'0';
</script>
</div>
我開始我的正則表達式與此:<div class="name"[^>]*>[\s\S]+?</div>
和我刪除HTML。即時通訊使用這樣的:<[^>]*>
的放出來是怎麼過的,孟沙海鮮花園餐廳<script type = "text/javascript"> ...</script><div>
一個,我想是在孟沙海鮮花園Restaurant..can誰能幫助我?
[不要使用正則表達式來解析HTML!](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454) – 2010-06-01 04:24:22
找到正則表達式..它更好地爲我使用(?= ),而不是使用「div class ='name」「 – akmalizhar 2010-06-01 05:06:17