Sub 提取漢字()
Dim regx As New VBScript_RegExp_55.RegExp
Dim arr1
arr1 = Application.WorksheetFunction.Transpose(Range("A2:A15"))
For k = 1 To UBound(arr1)
With regx
.Global = True
.IgnoreCase = True
.Pattern = "[^0-9a-z ]+"
Cells(k + 1, 2) = .Execute(arr1(k))(0)
End With
Next
End Sub
Sub 提取英文()
Dim rex As New VBScript_RegExp_55.RegExp
Dim arr2
arr2 = Application.WorksheetFunction.Transpose(Range("A2:A15"))
For i = 1 To UBound(arr2)
With rex
.Pattern = "[a-z ]+"
Cells(i + 1, 3) = .Execute(arr2(i))(0)
Sub 提取漢字()
Dim regx As New VBScript_RegExp_55.RegExp
Dim arr1
arr1 = Application.WorksheetFunction.Transpose(Range("A2:A15"))
For k = 1 To UBound(arr1)
With regx
.Global = True
.IgnoreCase = True
.Pattern = "[^0-9a-z ]+"
Cells(k + 1, 2) = .Execute(arr1(k))(0)
End With
Next
End Sub
Sub 提取英文()
Dim rex As New VBScript_RegExp_55.RegExp
Dim arr2
arr2 = Application.WorksheetFunction.Transpose(Range("A2:A15"))
For i = 1 To UBound(arr2)
With rex
.Global = True
.IgnoreCase = True
.Pattern = "[a-z ]+"
Cells(i + 1, 3) = .Execute(arr2(i))(0)
End With
Next
End Sub