Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lib/elixir/lib/regex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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
Expand Down