首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

正则表达式取<select></select>解决思路

2012-06-01 
正则表达式取select/selectselect idpubname namepubname onchangeSelect()option value1

正则表达式取<select></select>
<select id=pubname name=pubname onchange="Select()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</td>
...................
<select>
....
</select>
---------------------------
请问大家一下,我现在想取第一个SELECT的字符串值,我现在写的正则表达式会连到下面的一起取到,请大家帮忙一下,看看这要怎么写,好像要用非贪婪模式,但我不会用

[解决办法]

C# code
<select id=pubname[\s\S]*?>[\s\S]*?</select> 

热点排行