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: define numbered groups in docs #3953
Labels
Milestone
Comments
Please note that bug summaries should have the form 'package/path: foo'. I am not sure what you are asking for. Quoting from the docs: The syntax of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages. More precisely, it is the syntax accepted by RE2 and described at http://code.google.com/p/re2/wiki/Syntax, except for \C. ... If 'Submatch' is present, the return value is a slice identifying the successive submatches of the expression. Submatches are matches of parenthesized subexpressions within the regular expression, numbered from left to right in order of opening parenthesis. Submatch 0 is the match of the entire expression, submatch 1 the match of the first parenthesized subexpression, and so on. |
There's two points in this bug: 1- Move the documentation of the regexp syntax to the go.doc package so it appears in the same page. Removing the non implemented fields, maybe? 2(and most important)- I had a hard time finding that what it's called 'numbered groups' in one doc is referred as 'submatches' in the other. Maybe just adding 'numbered groups' somewhere indicating that it's an equivalent term may help. For the second point I must say that when I'm programming I tend to use the search feature of my browser a lot ... if I don't find 'group' or 'numbered' in the spec I assume it's not here. Is this wrong? Maybe, but I'm not the only one doing this ... |
Regarding #1 above, I agree that including the syntax in the package godoc page would overwhelm the rest, but I think it would still be useful if the syntax was included as part of the Go distribution. Wouldn't it be possible to include it as a separate page and add a link to it? The distribution already includes ancillary pages for several other packages. (See Documents / Go Articles / Packages, http://golang.org/doc/#articles ) |
This issue was closed by revision 1b3c969. Status changed to Fixed. |
campoy
added
fixed
Suggested
Issues that may be good for new contributors looking for work to do.
labels
Mar 11, 2013
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
The text was updated successfully, but these errors were encountered: