Available on crate feature
demo only.Expand description
A demonstration of the types produced by the regex! macro.
The Email and EmailCapture types have both been implemented by the following code:
regex! {
pub Email = r"(\w+)@(?<domain>(\w+)(\.\w+)?)"
}Notable features include:
- A fully expanded ‘matcher’ type expression under
Email::Pattern, used to call a set of associated methods and perform the compile time matching. - Numbered and named captures generated specfic to the regular expression.
- Optional and essential captures use
Optionas required.
- Optional and essential captures use
- Lazily sliced capture groups.
Structs§
- A macro-generated regular expression matching the pattern:
(\w+)@(?<domain>(\w+)(\.\w+)?)with flags: []. See theRegextrait for associated matching and capturing functions. - Email
Capture - A macro-generated type that holds 5 captures for the associated regex,
Email. If present, named groups can be retrieved through their associated method.