急求一个正则表达式~如何过滤下划线和包括下划线后面的内容
正则表达式 [^_]*
ASP 例子
<%
Dim reg,str
str = "asd你好asd你好_fdsfdsfds"
Set reg = New RegExp
reg.Pattern = "[^_]*"
reg.IgnoreCase = true
reg.Global = False
Set Matches = reg.Execute(str)
Response.Write(Matches(0))
%>
Javascript 例子
<script type="text/javascript">
var reg = /[^_]*/
var str = "asd你好asd你好_fdsfdsfds";
alert(reg.exec(str));
</script>