Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions base/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ precompile(Tuple{typeof(Base.LineEdit.edit_insert), Base.LineEdit.PromptState, S
precompile(Tuple{typeof(Base.Terminals.width), Base.Terminals.TTYTerminal})
precompile(Tuple{Type{Base.Libc.TmStruct}, Float64})
precompile(Tuple{typeof(Base.Libc.strftime), String, Base.Libc.TmStruct})
precompile(Tuple{typeof(Base.replace), String, Base.Regex, String, Int64})
precompile(Tuple{typeof(Base.replace), String, Pair{Base.Regex,String}})
precompile(Tuple{typeof(Base.REPL.mode_idx), Base.REPL.REPLHistoryProvider, Base.LineEdit.Prompt})
precompile(Tuple{typeof(Base.LineEdit.commit_line), Base.LineEdit.MIState})
precompile(Tuple{typeof(Base.LineEdit.on_enter), Base.LineEdit.PromptState})
Expand Down Expand Up @@ -951,7 +951,7 @@ precompile(Tuple{typeof(Base.Markdown.footnote), Base.GenericIOBuffer{Array{UInt
precompile(Tuple{Type{Base.Markdown.Footnote}, Nothing, Array{Any, 1}})
precompile(Tuple{Type{Base.Markdown.Footnote}, Base.SubString{String}, Array{Any, 1}})
precompile(Tuple{typeof(Base.Markdown.github_table), Base.GenericIOBuffer{Array{UInt8, 1}}, Base.Markdown.MD})
precompile(Tuple{typeof(Base.replace), String, String, String, Int64})
precompile(Tuple{typeof(Base.replace), String, Pair{String,String}})
precompile(Tuple{typeof(Base.pop!), Array{Base.SubString{String}, 1}})
precompile(Tuple{typeof(Base.union!), Base.Set{Char}, String})
precompile(Tuple{typeof(Base.ht_keyindex), Base.Dict{Char, Nothing}, Char})
Expand Down Expand Up @@ -1022,7 +1022,7 @@ precompile(Tuple{typeof(Base.throw_boundserror), Array{AbstractString, 1}, Tuple
precompile(Tuple{typeof(Base.unsafe_copyto!), Array{AbstractString, 1}, Int64, Array{AbstractString, 1}, Int64, Int64})
precompile(Tuple{typeof(Base.start), Array{AbstractString, 1}})
precompile(Tuple{typeof(Base.done), Array{AbstractString, 1}, Int64})
precompile(Tuple{typeof(Base.replace), String, Base.Regex, String})
precompile(Tuple{typeof(Base.replace), String, Pair{Base.Regex,String}})
precompile(Tuple{typeof(Base.setindex!), Base.Dict{Any, Any}, Base.Cmd, Symbol})
precompile(Tuple{typeof(Base._setindex!), Base.Dict{Any, Any}, Base.Cmd, Symbol, Int64})
precompile(Tuple{typeof(Base.setindex!), Base.Dict{Any, Any}, Bool, Symbol})
Expand Down
4 changes: 2 additions & 2 deletions doc/src/manual/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,14 @@ to refer to the nth capture group and prefixing the substitution string with `s`
with `g<groupname>`. For example:

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

Numbered capture groups can also be referenced as `\g<n>` for disambiguation, as in:

```jldoctest
julia> replace("a", r".", s"\g<0>1")
julia> replace("a", r"." => s"\g<0>1")
"a1"
```

Expand Down