From c9fb6fb71766ddd87a8c5f7a490135d11029bc7e Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Thu, 1 Mar 2018 13:11:29 -0800 Subject: [PATCH] Deprecate callable regex objects --- base/deprecated.jl | 2 ++ base/regex.jl | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/deprecated.jl b/base/deprecated.jl index 44a0107d9f65c..12af0fb41d721 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -1452,6 +1452,8 @@ end link_pipe!(pipe, reader_supports_async = julia_only_read, writer_supports_async = julia_only_write), false) +@deprecate (r::Regex)(s) isfound(r, s) + # PR 26156 @deprecate trunc(x, digits, base) trunc(x, digits, base = base) @deprecate floor(x, digits, base) floor(x, digits, base = base) diff --git a/base/regex.jl b/base/regex.jl index d61938bb3e162..9edcfdfd10134 100644 --- a/base/regex.jl +++ b/base/regex.jl @@ -153,8 +153,6 @@ function contains(s::SubString, r::Regex, offset::Integer=0) r.match_data) end -(r::Regex)(s) = contains(s, r) - """ match(r::Regex, s::AbstractString[, idx::Integer[, addopts]])