RegExp
A string that contains a regular expression. A regular expression must by in ECMAScript syntax.
CodePage
Code page for regular expression pattern encoding or CP_UNICODE (-5) for UTF-16.
SubExpression
The number of sub-match to search for. 0 means the entire expression.
reFlags
Flags that change the behavior of the function. May be one or more of the following values:
Flag
Value
Description
RegExpIgnoreCase
0x00000002
True to ignore case and false to match case.
pToPointer to a replace pattern.size_toReplace pattern size.StartFrom
A start offset of the range. Must be a multiple of 2 if RegExpTypeUNICODE flag is specified.
Size
Range's size. Must be a multiply of 2 if RegExpTypeUNICODE flag is specified.
pReplacedPointer to a variable to receive a number of occurrences.
Return Value
Automation:A number of occurrences.Native:
S_OK or standard OLE error code.
Remarks
Finds and replaces all occurrences of regular expression matches with a given pattern. Complexity: varying.