All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog. This project adheres to Semantic Versioning, with the exception that 0.x versions can break between minor versions.
unicode
and perf-*
features of the regex crate. Disabling these features can reduce compile time and/or binary size for use cases where these features are not needed. (All features remain enabled by default.)+
in (?=hello)+
Regex
now has replace methods like the regex crate:replace
- single replacementreplace_all
- replace all non-overlapping matchesreplacen
- configurable number of replacementsRegex
now implements Clone
, Display
, FromStr
Captures
now implements Index<usize>
to access captures by number and Index<&str>
to access by namefind_iter
and captures_iter
to iterate over all non-overlapping matches for a stringfind_from_pos
to find
starting from a specific positionescape
function to escape special characters in a string so that it matches literally(?<name>...)
or (?P<name>...)
\k<name>
or (?P=name)
Captures::name
to get matched group by nameRegex::capture_names
to get capture names in regexCaptures::expand
for regex crate compatible syntaxExpander
for python-compatible syntax and advanced usageMatch::range
and some From
impls for convenience(?# comment)
syntax\u21D2
and \U0001F60A
captures_read_at
when delegating to regex crate((?!x)(a|ab))c
didn’t match abc
.delegate_size_limit
and delegate_dfa_size_limit
to RegexBuilder
to allow configuring these limits for regex crate.RegexBuilder
with backtrack_limit
to configure the new backtrack limit per regex.Error
now implements std::error::Error
trait(?>foo)
group syntax and the a++
, a*+
and a?+
possessive syntax\b
, \f
, \t
, \n
, \r
, \v
Debug
for Regex
find
to return a Match
struct (breaking change)Captures
API (breaking change):at
and pos
with get
that returns a Match
structis_empty
(use len
)]
and }
as literals{
as literal when not after atom\<
or \e
inside character classes\x{...}
escape(a|)
]
in character classes