Suggestion on replacing an is_regex call in Elixir -


Can anyone replace me in this alcacer case?

  def (archive), element) do r = case collection when is_tuple (c) -> Element (t) c in tuple_to_list when is_list (c) - & gt; Element is in C when is_regex (element) - & gt; Regex.match? (Element, c) when is_bitstring (element) - & gt; String.contains? (C, element) end if (not r), do: message.fail (collection, element, __ENV __. Function) end   

thanks < P>

You Regex.regex? (Element) .

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -