# `QuackDB.Ecto.Regex`
[🔗](https://github.com/elixir-vibe/quackdb/blob/main/lib/quack_db/ecto/regex.ex#L2)

DuckDB regular-expression helpers for Ecto queries.

DuckDB uses RE2 regular expressions. Elixir's `Regex` uses Erlang/OTP `:re`,
so only the shared regex subset is portable. Literal `~r/.../` patterns are
accepted for convenience and their compatible modifiers are translated to
DuckDB options.

    import Ecto.Query
    import QuackDB.Ecto.Regex

    from event in "events",
      where: regexp_matches(event.name, ~r/^duck/i),
      select: %{
        year: regexp_extract(event.name, ~r/(\d{4})/, 1),
        slug: regexp_replace(event.name, ~r/\s+/, "-", "g"),
        parts: regexp_split_to_array(event.name, ~r/\s*,\s*/)
      }

Compatible `~r` modifiers are translated to DuckDB option strings: `i`, `m`,
and `s`. Elixir's Unicode modifier is ignored; unsupported modifiers raise at
macro expansion time.

# `regexp_escape`
*macro* 

# `regexp_extract`
*macro* 

# `regexp_extract`
*macro* 

# `regexp_extract`
*macro* 

# `regexp_extract_all`
*macro* 

# `regexp_extract_all`
*macro* 

# `regexp_extract_all`
*macro* 

# `regexp_full_match`
*macro* 

# `regexp_full_match`
*macro* 

# `regexp_matches`
*macro* 

# `regexp_matches`
*macro* 

# `regexp_replace`
*macro* 

# `regexp_replace`
*macro* 

# `regexp_split_to_array`
*macro* 

# `regexp_split_to_array`
*macro* 

---

*Consult [api-reference.md](api-reference.md) for complete listing*
