Need to apply Unicode mode to match unicode properly (one of the unfortunate defaults in Elixir but its too late to fix now).
iex> Regex.match?( ~r/^[[:ascii:]]+$/u, <<72260::utf8>>)
false
iex> Regex.match?( ~r/^[[:ascii:]]+$/u, <<256::utf8>>)
false






















