Skip to content

Commit c9fb6fb

Browse files
committed
Deprecate callable regex objects
1 parent dfe015b commit c9fb6fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

base/deprecated.jl

+2
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,8 @@ end
14521452
link_pipe!(pipe, reader_supports_async = julia_only_read, writer_supports_async = julia_only_write),
14531453
false)
14541454

1455+
@deprecate (r::Regex)(s) isfound(r, s)
1456+
14551457
# PR 26156
14561458
@deprecate trunc(x, digits, base) trunc(x, digits, base = base)
14571459
@deprecate floor(x, digits, base) floor(x, digits, base = base)

base/regex.jl

-2
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ function contains(s::SubString, r::Regex, offset::Integer=0)
153153
r.match_data)
154154
end
155155

156-
(r::Regex)(s) = contains(s, r)
157-
158156
"""
159157
match(r::Regex, s::AbstractString[, idx::Integer[, addopts]])
160158

0 commit comments

Comments
 (0)