Hello!
Its a bug of rsplit or a feature of split?
str = "abcdefg"
split(str, r"cd") #fine
rsplit(str, r"cd") #error
Trace:
ERROR: MethodError: no method matching findlast(::Regex, ::String)
Closest candidates are:
findlast(::AbstractChar, ::AbstractString) at strings/search.jl:400
findlast(::AbstractString, ::AbstractString) at strings/search.jl:363
findlast(::Function, ::Union{AbstractString, AbstractArray}) at array.jl:2099
...
Stacktrace:
[1] _rsplit(str::String, splitter::Regex, limit::Int64, keepempty::Bool, strs::Vector{SubString{String}})
@ Base .\strings\util.jl:492
[2] rsplit(str::String, splitter::Regex; limit::Int64, keepempty::Bool)
@ Base .\strings\util.jl:479
[3] rsplit(str::String, splitter::Regex)
@ Base .\strings\util.jl:479
[4] top-level scope
@ none:1
Julia 1.6.2