欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

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