diff --git a/doc/src/manual/strings.md b/doc/src/manual/strings.md index 53e7111558abe..39442c70b948f 100644 --- a/doc/src/manual/strings.md +++ b/doc/src/manual/strings.md @@ -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`. For example: +with `\g`. For example: ```jldoctest julia> replace("first second", r"(\w+) (?\w+)" => s"\g \1")