例: Replace function

Sub Initialize
   Dim array1(2) As string
   Dim array2(2) As string
   Dim array3(2) As string
   Dim ret As Variant
   array1(0) = "original0"
   array1(1) = "ThisShouldNotBeReplaced1"
   array1(2) = "original2"
   array2(0) = "original"
   array2(1) = "ShouldNotFindThis"
   array2(2) = "once"
   array3(0) = "replaced--once--"
   array3(1) = "this should be skipped"
   array3(2) = "twice"
   ret = replace(array1, array2, array3)
   for x = 0 to 2
      Print ret(x)
   Next
End Sub 
'OUTPUT
'replaced--twice--0
'ThisShouldNotBeReplaced1
'replaced--twice--2