Add Documentation to RegexMatch and keys(::RegexMatch)#40486
Merged
vtjnash merged 2 commits intoJuliaLang:masterfrom Apr 19, 2021
Merged
Add Documentation to RegexMatch and keys(::RegexMatch)#40486vtjnash merged 2 commits intoJuliaLang:masterfrom
vtjnash merged 2 commits intoJuliaLang:masterfrom
Conversation
* Added documentation for RegexMatch and keys(::RegexMatch) * Updated the manual * Fix trailing whitespace
fredrikekre
reviewed
Apr 15, 2021
base/regex.jl
Outdated
Comment on lines
+175
to
+176
| julia> hr, min, ampm = m | ||
| RegexMatch("11:30", hour="11", minute="30", 3=nothing) |
Member
There was a problem hiding this comment.
Suggested change
| julia> hr, min, ampm = m | |
| RegexMatch("11:30", hour="11", minute="30", 3=nothing) | |
| julia> hr, min, ampm = m; |
base/regex.jl
Outdated
| """ | ||
| keys(m::RegexMatch) -> Vector | ||
|
|
||
| Returns a vector of keys for all capture groups of the underlying regex. |
Member
There was a problem hiding this comment.
Suggested change
| Returns a vector of keys for all capture groups of the underlying regex. | |
| Return a vector of keys for all capture groups of the underlying regex. |
base/regex.jl
Outdated
|
|
||
| Returns a vector of keys for all capture groups of the underlying regex. | ||
| A key is included even if the capture group fails to match. | ||
| That is, `idx` will be in the return value even if `m.captures[idx] == nothing`. |
Member
There was a problem hiding this comment.
Suggested change
| That is, `idx` will be in the return value even if `m.captures[idx] == nothing`. | |
| That is, `idx` will be in the return value even if `m[idx] == nothing`. |
Contributor
Author
|
@fredrikekre thanks for the review! Just pushed new commit accepting all suggestions. |
Contributor
Author
|
A test failed but I'm pretty sure it's unrelated to the PR. |
ElOceanografo
pushed a commit
to ElOceanografo/julia
that referenced
this pull request
May 4, 2021
antoine-levitt
pushed a commit
to antoine-levitt/julia
that referenced
this pull request
May 9, 2021
johanmon
pushed a commit
to johanmon/julia
that referenced
this pull request
Jul 5, 2021
78 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #40347. I went ahead and added documentation for the the RegexMatch type as well. I also updated the manual to destructure on m rather than m.captures.
Sorry about the second PR. I had whitespace issues in the old PR (#40485) and accidentally made a mess of the the commit graph trying to fix it, so I squashed those commits and opened a new PR.