MethodError: no method matching findall(::Regex, ::String)

Would you help me?
Is there any way, how to use function findall(::Regex,::String) in Julia ver1.1.1

Thank you in advance.
Best

It looks like that method was added in a later version of Julia. Off the top of my head, I’m not sure how you would duplicate the behavior of findall(::Regex, ::String) in Julia v1.1.

Here’s the result of @edit findall(r"a", "aabbcc") in Julia 1.4.2:

function findall(t::Union{AbstractString,Regex}, s::AbstractString; overlap::Bool=false)
    found = UnitRange{Int}[]
    i, e = firstindex(s), lastindex(s)
    while true
        r = findnext(t, s, i)
        isnothing(r) && break
        push!(found, r)
        j = overlap || isempty(r) ? first(r) : last(r)
        j > e && break
        @inbounds i = nextind(s, j)
    end
    return found
end

See if this runs in 1.1 or if it doesn’t because it relies on something introduced in a later version if it’s easy to tweak.

Also I would encourage you to switch to the latest Julia version - while 1.0.5 is the LTS version which some users might need, there isn’t usually a good reason to use an outdated non-LTS version over the current version.