|
Sub 提取内容()
Set regx = CreateObject("vbscript.regexp")
With regx
.Global = True
.Pattern = "\S+"
For Each Rng In [b1:b4]
Set mat = .Execute(Rng)
For Each m In mat
y = y + 1
Cells(Rng.Row, y + 2) = m
Next
y = 0
Next
End With
End Sub
Sub 规范符号()
Set regx = CreateObject("vbscript.regexp")
With regx
.Global = True
.Pattern = "-{2,}"
For Each Rng In [a1:a6]
n = n + 1
Cells(n, "b") = .Replace(Rng, "--")
Next
End With
End Sub
|
|