FindReplaceInString Method Example
The following example finds the first occurrence of the string AI1 within the string FIX32.NODE1.AI1.F_CV and replaces it with AI2, returning the new string in sReplacement. The operation is specified to include scripts in the search.
Dim lFirst As Long
Dim lCount As Long
Dim bsuccess As Boolean
Dim sTarget As String
Dim sReplacement As String
sTarget = "FIX32.NODE1.AI1.F_CV"
FindReplace.FindReplaceInString sTarget, 1, "AI1", "AI2", 8, lFirst, lCount, sReplacement, bsuccess