Skip to content

Commit c077dad

Browse files
authored
fix a couple replace(::String,...) from #25165 (#25260)
1 parent b385693 commit c077dad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

base/precompile.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ precompile(Tuple{typeof(Base.LineEdit.edit_insert), Base.LineEdit.PromptState, S
465465
precompile(Tuple{typeof(Base.Terminals.width), Base.Terminals.TTYTerminal})
466466
precompile(Tuple{Type{Base.Libc.TmStruct}, Float64})
467467
precompile(Tuple{typeof(Base.Libc.strftime), String, Base.Libc.TmStruct})
468-
precompile(Tuple{typeof(Base.replace), String, Base.Regex, String, Int64})
468+
precompile(Tuple{typeof(Base.replace), String, Pair{Base.Regex,String}})
469469
precompile(Tuple{typeof(Base.REPL.mode_idx), Base.REPL.REPLHistoryProvider, Base.LineEdit.Prompt})
470470
precompile(Tuple{typeof(Base.LineEdit.commit_line), Base.LineEdit.MIState})
471471
precompile(Tuple{typeof(Base.LineEdit.on_enter), Base.LineEdit.PromptState})
@@ -951,7 +951,7 @@ precompile(Tuple{typeof(Base.Markdown.footnote), Base.GenericIOBuffer{Array{UInt
951951
precompile(Tuple{Type{Base.Markdown.Footnote}, Nothing, Array{Any, 1}})
952952
precompile(Tuple{Type{Base.Markdown.Footnote}, Base.SubString{String}, Array{Any, 1}})
953953
precompile(Tuple{typeof(Base.Markdown.github_table), Base.GenericIOBuffer{Array{UInt8, 1}}, Base.Markdown.MD})
954-
precompile(Tuple{typeof(Base.replace), String, String, String, Int64})
954+
precompile(Tuple{typeof(Base.replace), String, Pair{String,String}})
955955
precompile(Tuple{typeof(Base.pop!), Array{Base.SubString{String}, 1}})
956956
precompile(Tuple{typeof(Base.union!), Base.Set{Char}, String})
957957
precompile(Tuple{typeof(Base.ht_keyindex), Base.Dict{Char, Nothing}, Char})
@@ -1022,7 +1022,7 @@ precompile(Tuple{typeof(Base.throw_boundserror), Array{AbstractString, 1}, Tuple
10221022
precompile(Tuple{typeof(Base.unsafe_copyto!), Array{AbstractString, 1}, Int64, Array{AbstractString, 1}, Int64, Int64})
10231023
precompile(Tuple{typeof(Base.start), Array{AbstractString, 1}})
10241024
precompile(Tuple{typeof(Base.done), Array{AbstractString, 1}, Int64})
1025-
precompile(Tuple{typeof(Base.replace), String, Base.Regex, String})
1025+
precompile(Tuple{typeof(Base.replace), String, Pair{Base.Regex,String}})
10261026
precompile(Tuple{typeof(Base.setindex!), Base.Dict{Any, Any}, Base.Cmd, Symbol})
10271027
precompile(Tuple{typeof(Base._setindex!), Base.Dict{Any, Any}, Base.Cmd, Symbol, Int64})
10281028
precompile(Tuple{typeof(Base.setindex!), Base.Dict{Any, Any}, Bool, Symbol})

doc/src/manual/strings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,14 +746,14 @@ to refer to the nth capture group and prefixing the substitution string with `s`
746746
with `g<groupname>`. For example:
747747

748748
```jldoctest
749-
julia> replace("first second", r"(\w+) (?<agroup>\w+)", s"\g<agroup> \1")
749+
julia> replace("first second", r"(\w+) (?<agroup>\w+)" => s"\g<agroup> \1")
750750
"second first"
751751
```
752752

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

755755
```jldoctest
756-
julia> replace("a", r".", s"\g<0>1")
756+
julia> replace("a", r"." => s"\g<0>1")
757757
"a1"
758758
```
759759

0 commit comments

Comments
 (0)