First check this is in Tools -> references :
Then you should follow this example :
Dim current_string As String
Dim my_pattern As String
my_pattern = "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}/(($[0-9]|[0-9] )|(1[0-9]))"
Dim my_regexp As RegExp
With my_regexp
.Global = True
.MultiLine = True
.IgnoreCase = False
.Pattern = my_pattern
End With
For i = 1 To N
current_string = Range("A" & i).Text
If my_regexp.test(current_string)=False Then
Range("A" & i).EntireRow.Hidden = True ' we only hide rows that doesn't match the regexp.
End If
Next i
Let me know if it helps !
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…