diff --git a/lib/elixir/lib/regex.ex b/lib/elixir/lib/regex.ex index d07f4479c2..db0b2ac263 100644 --- a/lib/elixir/lib/regex.ex +++ b/lib/elixir/lib/regex.ex @@ -3,6 +3,8 @@ # SPDX-FileCopyrightText: 2012 Plataformatec defmodule Regex do + # TODO: Remove the "Starting from Erlang/OTP 28" part in the Modifiers' + # section once Erlang/OTP 28+ is exclusively supported. @moduledoc ~S""" Provides regular expressions for Elixir. @@ -76,9 +78,16 @@ defmodule Regex do * `:caseless` (i) - adds case insensitivity - * `:dotall` (s) - causes dot to match newlines and also set newline to - anycrlf; the new line setting can be overridden by setting `(*CR)` or - `(*LF)` or `(*CRLF)` or `(*ANY)` according to `:re` documentation + * `:dotall` (s) - causes dot to match newlines and also sets newline to + `(*ANYCRLF)`.\ + The new line setting, as described in the [`:re` documentation](`:re`), + can be overridden by starting the regular expression pattern with: + * `(*CR)` - carriage return + * `(*LF)` - line feed + * `(*CRLF)` - carriage return, followed by line feed + * `(*ANYCRLF)` - any of the three above + * `(*ANY)` - all Unicode newline sequences + * _Starting from Erlang/OTP 28, `(*NUL)` - the NUL character (binary zero)_ * `:multiline` (m) - causes `^` and `$` to mark the beginning and end of each line; use `\A` and `\z` to match the end or beginning of the string