The IMRegExp class is a very powerful and straightforward 'helper' for using regular expressions in scripts. The Replace method always replaces All occurences of the matched text. Sometimes though, I only want to replace the First occurence of the matched text.
Can we have an optional integer parameter (MaxReplacements)? If the parameter isn't provided, default to All?
Can't this be expressed in the RegExp directly?
Duh! :-[
Of course - step away, come back later, look at it from a different direction - works every time . . .
Please mark this as SOLVED.