Since VBScript doesn't support lookbehinds, I'm looking for an alternative solution.
I have the string '\E\F\'.
I want to replace \F\ with '~', but ONLY if it is not preceded by a \E.
After the substitution, I want '\E\F\' to be '\E\F\'.
If the string was 'randomText\F\', I would want it to look like 'randomText~' after the substitution.
Solution:
I just decided to StrReverse it and do a negative forward lookahead. It's not the most elegant solution, but it seems to work in this case.
Dim regEx, str1
str1 = StrReverse("The quick \F\ brown \E\F\ dog.")
Set regEx = New RegExp
regEx.IgnoreCase = True
regEx.Pattern = "\\F\\(?!E\\)"
regEx.Global = True
ReplaceTest = regEx.Replace(str1, "%")