From d0e716f9a6b6e051e39c9eda8477ab7992b4789a Mon Sep 17 00:00:00 2001 From: Alex Gubarev Date: Fri, 10 Jul 2026 06:24:43 +0300 Subject: [PATCH] regex doc fixes --- lib/elixir/lib/regex.ex | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/elixir/lib/regex.ex b/lib/elixir/lib/regex.ex index 9386fda326b..883017777ee 100644 --- a/lib/elixir/lib/regex.ex +++ b/lib/elixir/lib/regex.ex @@ -23,7 +23,7 @@ defmodule Regex do A Regex is represented internally as the `Regex` struct. Therefore, `%Regex{}` can be used whenever there is a need to match on them. - Keep in mind that all of the structs fields are private. And since + Keep in mind that all struct's fields are private. And since regexes are compiled, there is no guarantee two regular expressions from the same source are equal, for example: @@ -284,10 +284,10 @@ defmodule Regex do ## Examples - Regex.import(~r/foo/E) + iex> Regex.import(~r/foo/E) ~r/foo/ - Regex.import(~r/foo/) + iex> Regex.import(~r/foo/) ~r/foo/ """ @@ -491,6 +491,7 @@ defmodule Regex do and will raise an exception unless the `:strict` option is false. ## Examples + iex> Regex.to_embed(~r/foo/) "(?-imsx:foo)"