Yes. And if any unknown option is given, perhaps we should store the
underlying options in the struct and change the inspect representation to
output Regex.compile!(…)

Please open up an issue and PRs welcome too!

On Mon, Jul 18, 2022 at 05:41 Quentin Crain <czrp...@gmail.com> wrote:

> Hi!
>
> I hope I am acting appropriately here!
>
> Per this elixirforum post:
> https://elixirforum.com/t/is-it-normal-that-regex-compile-2-does-not-print-regex-modifiers-when-atoms-are-passed-in-options/48992
>
> When atoms are used as options to Regex.compile, they are not translated
> into their character equivalents and added to the Regex struct:
>
> iex(6)> Regex.compile("foo", "i")
> {:ok, ~r/foo/i}
> iex(7)> Regex.compile("foo", [:caseless])
> {:ok, ~r/foo/}
>
> Should they be? I have an initial implementation waiting if so . . .
>
> Respectfully,
>
>    Quentin (Q)
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elixir-lang-core+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elixir-lang-core/30477ff6-7eca-4e66-a118-2bf3920abd34n%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/30477ff6-7eca-4e66-a118-2bf3920abd34n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4L44qptzvxG91qjguCb9Ac2pE2uemkr-kj7xRhShHrZrw%40mail.gmail.com.

Reply via email to