diff --git a/base/regex.jl b/base/regex.jl index 0351472e88b228..34b122ab58370d 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -387,7 +387,7 @@ function findall(t::Union{AbstractString,AbstractPattern}, s::AbstractString; ov i, e = firstindex(s), lastindex(s) while true r = findnext(t, s, i) - isnothing(r) && break + r === nothing && break push!(found, r) j = overlap || isempty(r) ? first(r) : last(r) j > e && break