Skip to main content

Module replace

Module replace 

Source
Expand description

Replacement and splitting for the idiomatic API. The Replacer trait drives Regex::replace_all and its relatives, and Split and its relatives back Regex::split. They follow the shape of the regex crate and walk the same matches as Regex::find_iter and Regex::captures_iter.

Structs§

NoExpand
A replacement that is inserted exactly as given, with no $ expansion.
NoExpandBytes
A byte replacement that is inserted exactly as given, with no $ expansion. The byte counterpart of NoExpand.
Split
Iterator over the pieces of a &str between matches, from Regex::split.
SplitBytes
Iterator over the pieces of a byte slice between matches, from Regex::split_bytes.
SplitN
Iterator over at most a given number of pieces of a &str, from Regex::splitn.
SplitNBytes
Iterator over at most a given number of pieces of a byte slice, from Regex::splitn_bytes.

Traits§

Replacer
Produces the text that replaces one match in Regex::replace and its relatives.
ReplacerBytes
The byte-slice counterpart of Replacer, used by the _bytes replace methods such as Regex::replace_all_bytes.