代码如下: Dim objRegex As Object Set objRegex = CreateObject("vbscript.regexp") With objRegex .Global = True .IgnoreCase = True .Pattern = "[\u4e00-\u9fa5]+" End WithDim matches, s s = "这是一个用来提取中文的VBA正则代码" Set matches = objRegex.Execute(s) If matches.Count > 0 Then For Each match In mat
写一个正则代码提取中文VBA
最新推荐文章于 2024-05-30 19:00:22 发布