Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _.REReplace(string, regex, callback, [scope], [context]) #36

Open
russplaysguitar opened this issue Mar 14, 2013 · 0 comments
Open

Comments

@russplaysguitar
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant