Function valDatabyRegEx(strFindin As String, strPattern As String, Optional bolMatchCase As Boolean = False) As Boolean
With CreateObject("vbscript.regexp")
.IgnoreCase = Not bolMatchCase
.Pattern = strPattern
valDatabyRegEx = .test(strFindin) = True
End With
End Function
Function getDatabyRegEx(strFindin As String, strPattern As String, Optional strReplacement As String = "", Optional bolGlobalReplace As Boolean = True, Optional bolMatchCase As Boolean = False) As Variant
Dim colmatch As Object
Dim itm As Variant
Dim retArray() As String
Dim intBounds As Integer
intBounds = -1
If valDatabyRegEx(strFindin, strPattern, bolMatchCase) Then
With CreateObject("vbscript.regexp")
.IgnoreCase = Not bolMatchCase
.Global = bolGlobalReplace
.Pattern = strPattern
Set colmatch = .Execute(strFindin)
If bolGlobalReplace Then
For Each itm In colmatch
intBounds = intBounds + 1
ReDim Preserve retArray(0 To intBounds)
retArray(intBounds) = itm
Next
Else
ReDim retArray(0)
retArray(0) = colmatch(0)
End If
End With
getDatabyRegEx = retArray
Else
getDatabyRegEx = Array("")
End If
End Function
Well, that's not what you are showing
1.6i
is Number Period Number i
??
mx