From 0a7a0f8be954ed5c0d20fbc87a12b64c9f1a435c Mon Sep 17 00:00:00 2001 From: Stephan Hilb Date: Sun, 2 Dec 2018 12:25:06 +0100 Subject: [PATCH] doc: fix typo for named regex capture group --- 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 87a9ed548c636..1fd2a5badedcd 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")