下面是一段可以参考的代码,可以在2014.06版本中使用
//newText = Plugin.Sys.GetCLB()获取剪切板内容 newText="啊a41波bB2次cC3的d饿e佛f鸡J喝H哎I四4五5陆6" TracePrint regularExSearch(newText,"[^\w]") TracePrint regularExSearch(newText,"[\d+]") TracePrint regularExSearch(newText,"[a-z]") TracePrint regularExSearch(newText,"[A-Z]") TracePrint regularExSearch(newText,"[a-z,A-Z]") Function regularExSearch(newText, 元字符) Dim regEx, Matches获取, Match Set regEx = New regExp regEx.[Global] = True // regEx.IgnoreCase = False//忽略大小写关闭 regEx.pattern = 元字符 Set matches = regEx.execute(newText) For Each Match In Matches regularExSearch = regularExSearch & Match Next End Function