ASP正则函数替换分页后的参数
程序员文章站
2024-01-28 21:12:10
function drexpage(str) dim regex &n...
function drexpage(str)
dim regex
if isnull(str) or str="" then exit function
set regex=new regexp
regex.ignorecase=true
regex.pattern="(\&)?page=(\d)+"
drexpage=regex.replace(str,"") '(str,"$1")
set regex=nothing
end function
在分页系统里面用到的把page后面得东西都给丢掉
dim regex
if isnull(str) or str="" then exit function
set regex=new regexp
regex.ignorecase=true
regex.pattern="(\&)?page=(\d)+"
drexpage=regex.replace(str,"") '(str,"$1")
set regex=nothing
end function
在分页系统里面用到的把page后面得东西都给丢掉