Struct posix_regex::matcher::PosixRegex
source · pub struct PosixRegex<'a> { /* private fields */ }
Expand description
A regex matcher, ready to match stuff
Implementations
sourceimpl<'a> PosixRegex<'a>
impl<'a> PosixRegex<'a>
sourcepub fn new(tree: Cow<'a, Tree>) -> Self
pub fn new(tree: Cow<'a, Tree>) -> Self
Create a new matcher instance from the specified alternations. This
should probably not be used and instead an instance should be obtained
from PosixRegexBuilder
, which also compiles a string into regex.
sourcepub fn case_insensitive(self, value: bool) -> Self
pub fn case_insensitive(self, value: bool) -> Self
Chainable function to enable/disable case insensitivity. Default: false. When enabled, single characters match both their upper and lowercase representations.
sourcepub fn newline(self, value: bool) -> Self
pub fn newline(self, value: bool) -> Self
Chainable function to enable/disable newline mode. Default: false. When enabled, ^ and $ match newlines as well as start/end. This behavior overrides both no_start and no_end.
sourcepub fn no_start(self, value: bool) -> Self
pub fn no_start(self, value: bool) -> Self
Chainable function to enable/disable no_start mode. Default: false. When enabled, ^ doesn’t actually match the start of a string.
sourcepub fn no_end(self, value: bool) -> Self
pub fn no_end(self, value: bool) -> Self
Chainable function to enable/disable no_start mode. Default: false. When enabled, $ doesn’t actually match the end of a string.
sourcepub fn count_groups(&self) -> usize
pub fn count_groups(&self) -> usize
Return the total number of matches that will be returned by
matches_exact
or in each match in matches
.
Trait Implementations
sourceimpl<'a> Clone for PosixRegex<'a>
impl<'a> Clone for PosixRegex<'a>
sourcefn clone(&self) -> PosixRegex<'a>
fn clone(&self) -> PosixRegex<'a>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more