ASP 正则函数替换分页后的参数
程序员文章站
2022-07-02 19:44:14
复制代码 代码如下:function drexpage(str) dim regex if isnull(str) or str="" then exit function...
复制代码 代码如下:
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