@@ -27,7 +27,7 @@ For all of the following functions, argument `expression` is the target string,
2727
2828* Arguments: ` expression, needle, replacement, [context] ` *
2929
30- Replaces all unescaped instances of a regex pattern in the given context, using a replacement string or callback function.
30+ Replaces all unescaped instances of a regex pattern in the given context, using a replacement string or function.
3131
3232<details >
3333 <summary >Examples with a replacement string</summary >
@@ -46,7 +46,7 @@ replaceUnescaped(str, '\\.', '@', Context.CHAR_CLASS);
4646Details for the ` replacement ` argument:
4747
4848- If a string is provided, it's used literally without special handling for backreferences, etc.
49- - If a callback function is provided, it receives two arguments:
49+ - If a function is provided, it receives two arguments:
5050 1 . The match object (which includes ` groups ` , ` index ` , etc.).
5151 2 . An object with extended details (` context ` and ` negated ` ) about where the match was found.
5252
@@ -66,9 +66,7 @@ Checks whether an unescaped instance of a regex pattern appears in the given con
6666
6767* Arguments: ` expression, needle, callback, [context] ` *
6868
69- Runs a callback function for each unescaped instance of a regex pattern in the given context.
70-
71- Callback functions receive two arguments:
69+ Runs a function for each unescaped match of a regex pattern in the given context. The function receives two arguments:
7270
73711 . The match object (which includes ` groups ` , ` index ` , etc.).
74722 . An object with extended details (` context ` and ` negated ` ) about where the match was found.
0 commit comments