I think you’re mistaken. Strings and charlists are not the same thing. Just to confirm:
iex(1)> x = '1234' # note: single-quote to make it a charlist, not a binary / string
'1234'
iex(2)> Regex.match?(~r/23/, x)
** (FunctionClauseError) no function clause matching in Regex.match?/2
The following arguments were given to Regex.match?/2:
# 1
~r/23/
# 2
'1234'
Attempted function clauses (showing 1 out of 1):
def match?(%Regex{re_pattern: compiled}, string) when is_binary(string)
(elixir) lib/regex.ex:231: Regex.match?/2






















