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
  • Loading branch information
stev47 authored and fredrikekre committed Dec 4, 2018
1 parent 7920a2a commit d8558ee
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 d8558ee

Please sign in to comment.