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

regexp: example for Regexp.Expand #21649

Closed
matejb opened this issue Aug 27, 2017 · 3 comments
Closed

regexp: example for Regexp.Expand #21649

matejb opened this issue Aug 27, 2017 · 3 comments

Comments

@matejb
Copy link
Contributor

matejb commented Aug 27, 2017

I found Regexp.Expand missing a simple example of use and would like to contribute one.

Although function has fair amount of documentation, it's usage was unclear to me at first passing through regexp package documentation. I find it very useful in everyday work.

The example would be similar to https://play.golang.org/p/Ok-F8RvwSO

@a-h
Copy link
Contributor

a-h commented Aug 27, 2017

Nice. I added a bit more text to the example to explain what's going on, is that helpful do you think? https://play.golang.org/p/JbEaidJtim

@matejb
Copy link
Contributor Author

matejb commented Aug 28, 2017

@a-h good point. Most examples are minimal but in this case it could be useful to reader to have a bit of explanation.

@gopherbot
Copy link

Change https://golang.org/cl/59470 mentions this issue: regexp: examples for Regexp.Expand and Regexp.ExpandString functions

@golang golang locked and limited conversation to collaborators Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants