Skip to content

Commit

Permalink
doc: fix typo for named regex capture group (#30237)
Browse files Browse the repository at this point in the history
(cherry picked from commit d8558ee)
  • Loading branch information
stev47 authored and KristofferC committed Dec 6, 2018
1 parent 3164cfb commit 6505797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/src/manual/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ julia> m[2]
Captures can be referenced in a substitution string when using [`replace`](@ref) by using `\n`
to refer to the nth capture group and prefixing the substitution string with `s`. Capture group
0 refers to the entire match object. Named capture groups can be referenced in the substitution
with `g<groupname>`. For example:
with `\g<groupname>`. For example:

```jldoctest
julia> replace("first second", r"(\w+) (?<agroup>\w+)" => s"\g<agroup> \1")
Expand Down

0 comments on commit 6505797

Please sign in to comment.