The input string to match
The pattern string, may contain * and *+ wildcards
The replacement string, may contain <1>, <2>, ... for captures
OptionalcharCompare: CharCompareOptional custom character comparison function
The replaced string if matched, or null if not matched
Matches a string against a pattern and replaces using the replacement string if matched