From 9f7b4d1b070c79d1da4658fca2df38dfcb6f672c Mon Sep 17 00:00:00 2001 From: Stephan Hilb Date: Tue, 4 Dec 2018 15:46:30 +0100 Subject: [PATCH] doc: fix typo for named regex capture group (#30237) (cherry picked from commit d8558ee055d7fb3da881eb6df868773c8469ae11) --- doc/src/manual/strings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")