草丛的村落,完美世界 最新章节,贵州人事考试信息网
返回在一个搜索字符串中找到的匹配的值或文本。
object.value
object 参数总是一个 match 对象。
下列代码说明了 value 属性的用法:
function regexptest(patrn, strng) dim regex, match, matches ' 建立变量。 set regex = new regexp ' 建立正则表达式。 regex.pattern = patrn ' 设置模式。 regex.ignorecase = true ' 设置是否区分字母的大小写。 regex.global = true ' 设置全程可用性。 set matches = regex.execute(strng) ' 执行搜索。 for each match in matches ' 遍历matches集合。 retstr = retstr & "match " & i & " found at position " retstr = retstr & match.firstindex & ". match value is "' retstr = retstr & match.value & "'." & vbcrlf next regexptest = retstrend functionmsgbox(regexptest("is.", "is1 is2 is3 is4"))
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
网友评论