{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/29250","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/29250/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/29250/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/29250/events","html_url":"https://github.com/JuliaLang/julia/issues/29250","id":361388624,"node_id":"MDU6SXNzdWUzNjEzODg2MjQ=","number":29250,"title":"occursin.() fails for Regex in Julia 1.0","user":{"login":"montyvesselinov","id":5632376,"node_id":"MDQ6VXNlcjU2MzIzNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5632376?v=4","gravatar_id":"","url":"https://api.github.com/users/montyvesselinov","html_url":"https://github.com/montyvesselinov","followers_url":"https://api.github.com/users/montyvesselinov/followers","following_url":"https://api.github.com/users/montyvesselinov/following{/other_user}","gists_url":"https://api.github.com/users/montyvesselinov/gists{/gist_id}","starred_url":"https://api.github.com/users/montyvesselinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montyvesselinov/subscriptions","organizations_url":"https://api.github.com/users/montyvesselinov/orgs","repos_url":"https://api.github.com/users/montyvesselinov/repos","events_url":"https://api.github.com/users/montyvesselinov/events{/privacy}","received_events_url":"https://api.github.com/users/montyvesselinov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-18T16:35:38Z","updated_at":"2018-09-18T21:52:28Z","closed_at":null,"author_association":"NONE","body":"```\r\nma = occursin.(r\" 1 - A 1$\", \" 1 - A 1\")\r\nERROR: MethodError: no method matching length(::Regex)\r\nClosest candidates are:\r\n  length(::Core.SimpleVector) at essentials.jl:571\r\n  length(::Base.MethodList) at reflection.jl:728\r\n  length(::Core.MethodTable) at reflection.jl:802\r\n  ...\r\nStacktrace:\r\n [1] _similar_for(::UnitRange{Int64}, ::Type, ::Regex, ::Base.HasLength) at ./array.jl:532\r\n [2] _collect(::UnitRange{Int64}, ::Regex, ::Base.HasEltype, ::Base.HasLength) at ./array.jl:563\r\n [3] collect(::Regex) at ./array.jl:557\r\n [4] broadcastable(::Regex) at ./broadcast.jl:609\r\n [5] broadcasted(::Function, ::Regex, ::String) at ./broadcast.jl:1139\r\n [6] top-level scope at none:0\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/422569364","html_url":"https://github.com/JuliaLang/julia/issues/29250#issuecomment-422569364","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/29250","id":422569364,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjU2OTM2NA==","user":{"login":"montyvesselinov","id":5632376,"node_id":"MDQ6VXNlcjU2MzIzNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/5632376?v=4","gravatar_id":"","url":"https://api.github.com/users/montyvesselinov","html_url":"https://github.com/montyvesselinov","followers_url":"https://api.github.com/users/montyvesselinov/followers","following_url":"https://api.github.com/users/montyvesselinov/following{/other_user}","gists_url":"https://api.github.com/users/montyvesselinov/gists{/gist_id}","starred_url":"https://api.github.com/users/montyvesselinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montyvesselinov/subscriptions","organizations_url":"https://api.github.com/users/montyvesselinov/orgs","repos_url":"https://api.github.com/users/montyvesselinov/repos","events_url":"https://api.github.com/users/montyvesselinov/events{/privacy}","received_events_url":"https://api.github.com/users/montyvesselinov/received_events","type":"User","site_admin":false},"created_at":"2018-09-18T21:52:28Z","updated_at":"2018-09-18T21:52:28Z","author_association":"NONE","body":"I confused. It works for string:\r\n\r\n```\r\njulia> occursin.(\" 1 - A \", [\" 1 - A 1\", \" 1 - A 1\"])\r\n2-element BitArray{1}:\r\n true\r\n true\r\n\r\njulia> occursin.(r\" 1 - A \", [\" 1 - A 1\", \" 1 - A 1\"])\r\nERROR: MethodError: no method matching length(::Regex)\r\nClosest candidates are:\r\n  length(::Core.SimpleVector) at essentials.jl:571\r\n  length(::Base.MethodList) at reflection.jl:728\r\n  length(::Core.MethodTable) at reflection.jl:802\r\n```"}}
{"actor":{"display_login":"montyvesselinov"}}