Module

Regex

Changes by version

Elixir 1.19.0

· 3 changes

Enhancement Tool: Elixir

Add Regex.to_embed/2 which returns an embeddable representation of regex in another regex

Enhancement Tool: Elixir

Raise error message when regexes are used as default values in struct fields for compatibility with Erlang/OTP 28

Bugfix Tool: Elixir

Fix Regex.split/2 returning too many results when the chunk being split on was empty (which can happen when using features such as /K)

Elixir 1.18.2

· 1 change

Enhancement Tool: Elixir

Ensure compatibility with Erlang/OTP 28+ new Regex engine

Elixir 1.15.0

· 1 change

Hard Deprecation Tool: Elixir

Regex.regex?/1 is deprecated in favor of Kernel.is_struct/2

Elixir 1.14.0

· 1 change

Bugfix Tool: Elixir

Show list options when inspecting a Regex manually defined with Regex.compile/2

Elixir 1.12.0

· 1 change

Enhancement Tool: Elixir

Add offset option to Regex.scan/3 and Regex.run/3

Elixir 1.11.0

· 1 change

Enhancement Tool: Elixir

Regex.regex?/1 is deprecated in favor of Kernel.is_struct/2

Elixir 1.9.2

· 1 change

Bugfix Tool: Elixir

Ensure dynamic recompilation of regexes considers options. This fixes an issue where parsing the protocol in URI.parse/1 seemingly looked case sensitive when running Elixir precompiled on another machine

Elixir 1.9.0

· 2 changes

Enhancement Tool: Elixir

Automatically recompile regexes

Bugfix Tool: Elixir

Ensure inspect returns valid ~r// expressions when they are manually compiled with backslashes

Elixir 1.7.0

· 1 change

Enhancement Tool: Elixir

Include endianness in the regex version. This allows regexes to be recompiled when an archive is installed in a system with a different endianness

Elixir 1.6.0

· 1 change

Bugfix Tool: Elixir

Return a leading empty space when splitting on empty pattern. This makes the split operation consistent with the other operations in the Regex module

Elixir 1.5.0

· 1 change

Bugfix Tool: Elixir

Fix inspect/2 for regexes with / terminator in them

Elixir 1.4.3

· 1 change

Enhancement Tool: Elixir

Add recompile/1 and recompile!/1 to ease transition to OTP 20 for archives and stored regexes

Elixir 1.4.1

· 1 change

Bugfix Tool: Elixir

Ensure Regex.escape/1 also escapes -

Elixir 1.3.0

· 2 changes

Enhancement Tool: Elixir

Support :include_captures in Regex.split/3

Enhancement Tool: Elixir

The option /r (for ungreedy) has been deprecated in favor of /U

Elixir 1.1.0

· 3 changes

Bugfix Tool: Elixir

Fix splitting of empty strings with regexes when trim is set to true. Now both String.split/3 and Regex.split/3 return an empty list when called with an empty string and trim is enabled

Bugfix Tool: Elixir

Fix Regex.replace/4 so it doesn't discard escape characters

Enhancement Tool: Elixir

Ungreedy option r is deprecated in favor of U (which is standard in regular expressions in other languages)

Elixir 1.0.3

· 1 change

Enhancement Tool: Elixir

Fix Regex.replace/4 failures when the number of substitutions in pattern is more than the number of matches and support \g{...} patterns

Elixir 0.15.0

· 2 changes

Enhancement Tool: Elixir

Do not consider include captures on Regex.split/3 results

Enhancement Tool: Elixir

Do not consider include captures on Regex.split/3 results

Elixir 0.13.3

· 1 change

Enhancement Tool: Elixir

Properly escape regex (previously regex controls were double escaped)

Elixir 0.13.2

· 2 changes

Enhancement Tool: Elixir

Support functions in Regex.replace/4

Enhancement Tool: Elixir

Deprecate :global option in Regex.split/3 in favor of parts: :infinity

Elixir 0.13.1

· 2 changes

Enhancement Tool: Elixir

Regex.groups/1 is deprecated in favor of Regex.names/1

Enhancement Tool: Elixir

Regexes are no longer unicode by default. Instead, they must be explicitly marked with the u option

Elixir 0.13.0

· 1 change

Enhancement Tool: Elixir

Regexes no longer need the "g" option when there is a need to use named captures

Elixir 0.10.3

· 2 changes

Enhancement Tool: Bug fixes

Fix bug on Regex.scan/3 when capturing groups and the regex has no groups

Enhancement Tool: Deprecations

Regex.captures/3 is deprecated in favor of Regex.named_captures/3

Elixir 0.10.2

· 1 change

Enhancement Tool: Elixir

Allow erlang re options when compiling Elixir regexes

Elixir 0.10.1

· 1 change

Enhancement Tool: Elixir

Regex.scan/3 now always returns a list of lists, normalizing the result, instead of list with mixed lists and binaries