怎么提取ASP中字符串中的英文,比如abc21+456

来源:百度知道 编辑:UC知道 时间:2024/05/31 05:17:29
要把abc提取出来怎么办?

str="abc21+456"
for i=1 to len(str)
aaa=mid(str,i,1)
if (aaa>="A" and aaa<="Z") or (aaa>="a" and aaa<="z") then response.write aaa
next

s="abc21+456"
msgbox re(s)
function re(a)
set regex=new regexp
regex.pattern="[A-Za-z]+"
regex.global=true
set match=regex.execute(a)
re=Match(0)
end function