Well, let's work backwards. First, the Replace method of the RegExp class:
Code:
Text2.Text = re.Replace(Text1.Text, myReplacer)
Since the replace method takes 2 strings, it follows that "myReplacer" evaluates to a string. Look at the class. It has a function called ReplacerFunction, which takes one argument, a variant array called a, and outputs a string. So. Also, ReplacerFunction is the default method, meaning it gets called when there is a reference to its object with no method or property. (Neat trick, I've only used this when making default properties.) So, in the code above, myReplacer can take any number of strings as arguments, then massage them via its replacerfunction method, and output a string that's valid in terms of the second argument of the Replace method.
That's mighty cool, but looking at the code, I'm thinking that there must be arguments passed to the above line for it to do any actual work. Furthermore, looking at the "very poor" code, I'm thinking it's very poor because it only evaluates the first member of the a array. So, I'm wondering if actual usage would be more like
Code:
Text2.Text = re.Replace(Text1.Text, myReplacer(strA, strB, ...))
And then having the method evaluate each string and cobble them together to send to the Replace method.
Some nice wrinkles in this code.
Bob