Try this test to make your decision on what to do.
<%
strString = "12345678"
start = Timer()
For i = 1 To 1000
RexEx(strString)
Next
response.write "RegularExpersion = " & GetTime(start) & "<br>"
start = Timer()
For i = 1 To 1000
MidLoop(strString)
Next
response.write "MidLoop = " & GetTime(start) & "<br>"
start = Timer()
For i = 1 To 1000
MidHardCode(strString)
Next
response.write "MidHardCode = " & GetTime(start) & "<br>"
start = Timer()
For i = 1 To 1000
ArrayBreak(strString)
Next
response.write "ArrayBreak = " & GetTime(start) & "<br>"
Function GetTime(start)
GetTime = FormatNumber(Timer() - start,4)
End Function
Function MidLoop(strData)
for iLoop = 1 to len(strData) Step 2
MidLoop = mid(strData,iLoop,2) & " "
next
End Function
Function MidHardCode(strData)
MidHardCode = Mid( strData, 1, 2 ) _
& " " & Mid( strData, 3, 2 ) _
& " " & Mid( strData, 5, 2 ) _
& " " & Mid( strData, 7, 2 )
End Function
Function RexEx(strData)
Set regEx = New RegExp
regEx.Pattern = "(..)(?=.)"
regEx.Global = True
RexEx = regEx.Replace(strData, "$1 ")
End Function
Function ArrayBreak(strData)
Dim aryData()
intLen = Len(strData)
If intLen > 0 Then
ReDim aryData((intLen \ 2) + 1)
intCount = 0
for iLoop = 1 to len(strData) Step 2
strItem = Trim(mid(strData,iLoop,2))
If Len(strItem) > 0 Then
aryData(intCount) = strItem
intCount = intCount + 1
End If
next
ArrayBreak = Trim(Join(aryData," "))
End If
End Function
%>