I am not trying to reinvent the wheel. It just searches for a function that searches for a string or string vector and returns true for each element in which a match is found. This is what I have tried so far.
grepl(x::String, y) = length(search(x, y)) > 0 grepl(x::Vector{String}, y) = length.(search(x, y)) .> 0 grepl(x::Vector{AbstractString}, y) = length.(search(x, y)) .> 0
Usage example:
v = string.('a':'z') x = rand(v, 100) .* rand(v, 100) .* rand(v, 100) grepl(convert(Vector{String}, x), "z")
Well, this will be a working example if I can get my types to work correctly. Basically, I could use return to select only elements that have a "z" in them.
source share