Currently, you cannot pass a callback to REReplace(). I propose adding _.REReplace(string, regex, callback, [scope], [context]) to the library. If a substring is passed instead of a callback, then it would defer to the original REReplace(). Otherwise, it would work similarly to the JS replace() function, which passes the regex match and any group captures to the callback function. To maintain logical similarity to the original REReplace(), the optional scope parameter would work the same as it does in the original.
Currently, you cannot pass a callback to REReplace(). I propose adding
_.REReplace(string, regex, callback, [scope], [context])
to the library. If a substring is passed instead of a callback, then it would defer to the original REReplace(). Otherwise, it would work similarly to the JS replace() function, which passes the regex match and any group captures to the callback function. To maintain logical similarity to the original REReplace(), the optional scope parameter would work the same as it does in the original.