###Function###
StringRegExpReplace

###Description###
Replace text in a string based on regular expressions.

###Syntax###
StringRegExpReplace ( "test", "pattern", "replace", [ count ] )


###Parameters###
@@ParamTable@@
test
	The string to check
pattern
	The regular expression to compare.  See <A href="StringRegExp.htm">StringRegExp</a> for pattern definition characters.
replace
	The text to replace the regular expression matching text with.
count
	[optional] The number of times to execute the replacement in the string.  The default is 0.  Use 0 for global replacement.
@@End@@


###ReturnValue###
Check @Error to make sure the function executed properly.
@@ReturnTable@@
@Error	Meaning
0	Executed properly.  Check @Extended and the return value to determine if the pattern was found or not.
1	Count invalid.  Return value is "".
2	Pattern invalid.  Return value is the first location in the string that was invalid, as an integer.
@@End@@

@Extended will be the number of replacements.

###Remarks###
None.

###Related###
StringReplace, StringRegExp

###Example###
@@IncludeExample@@
