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 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 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 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

@gopherbot gopherbot commented Aug 28, 2017

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

@gopherbot gopherbot closed this in 1fe1512 Aug 28, 2017
@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
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.