Skip to content

No documentation for re.replace_all(content, |caps: &Captures| { }) ? #154

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

Closed
sck opened this issue Jan 21, 2016 · 3 comments
Closed

No documentation for re.replace_all(content, |caps: &Captures| { }) ? #154

sck opened this issue Jan 21, 2016 · 3 comments

Comments

@sck
Copy link

sck commented Jan 21, 2016

I noticed that there is no documentation for using replace_all with a closure. This may be related to a bug in rustdoc: rust-lang/rust#29503

@BurntSushi
Copy link
Member

Could you explain more about what you're looking for? replace_all says "See the documentation for replace for details on how to access submatches in the replacement string." The documentation for replace has an example using a closure with captures.

@sck
Copy link
Author

sck commented Jan 21, 2016

Which documentation are you referring to? I cannot find any documentation in http://doc.rust-lang.org/regex/regex/index.html on either replace_all or replace about using a closure.... I was looking for the documentation of the API referenced in this stackoverflow post: http://stackoverflow.com/a/27486413

@BurntSushi
Copy link
Member

The API documentation is on the Regex type:

This crate's documentation provides some simple examples, describes Unicode support and exhaustively lists the supported syntax. For more specific details on the API, please see the documentation for the Regex type.

http://doc.rust-lang.org/regex/regex/enum.Regex.html

@sck sck closed this as completed Jan 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants