计算一个字符串在另一字符串中出现的次数函数
程序员文章站
2022-05-04 19:07:06
function strnum(patrn, strng) dim regex, match, m...
function strnum(patrn, strng)
dim regex, match, matches,xx
xx=0
set regex = new regexp
regex.pattern = patrn
regex.ignorecase = true ' 设置是否区分大小写。
regex.global = true
set matches = regex.execute(strng)
for each match in matches
xx=xx+1
next
strnum = xx
end function
dim regex, match, matches,xx
xx=0
set regex = new regexp
regex.pattern = patrn
regex.ignorecase = true ' 设置是否区分大小写。
regex.global = true
set matches = regex.execute(strng)
for each match in matches
xx=xx+1
next
strnum = xx
end function
上一篇: 高血脂的治疗与饮食原则是怎么样的
下一篇: 血糖低怎么调理,吃什么东西能调理?