Struct posix_regex::matcher::PosixRegex [−][src]
pub struct PosixRegex<'a> { /* fields omitted */ }
A regex matcher, ready to match stuff
Methods
impl<'a> PosixRegex<'a>
[src]
impl<'a> PosixRegex<'a>
pub fn new(branches: Cow<'a, [Vec<(Token, Range)>]>) -> Self
[src]
pub fn new(branches: Cow<'a, [Vec<(Token, Range)>]>) -> 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.
pub fn case_insensitive(self, value: bool) -> Self
[src]
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.
pub fn newline(self, value: bool) -> Self
[src]
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.
pub fn no_start(self, value: bool) -> Self
[src]
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.
pub fn no_end(self, value: bool) -> Self
[src]
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.
pub fn matches_exact(&self, input: &[u8]) -> Option<Vec<(usize, usize)>>
[src]
pub fn matches_exact(&self, input: &[u8]) -> Option<Vec<(usize, usize)>>
Match the string starting at the current position. This does not find substrings.
pub fn matches(
&self,
input: &[u8],
max: Option<usize>
) -> Vec<Vec<(usize, usize)>>
[src]
pub fn matches(
&self,
input: &[u8],
max: Option<usize>
) -> Vec<Vec<(usize, usize)>>
Match any substrings in the string, but optionally no more than max
Trait Implementations
impl<'a> Clone for PosixRegex<'a>
[src]
impl<'a> Clone for PosixRegex<'a>
fn clone(&self) -> PosixRegex<'a>
[src]
fn clone(&self) -> PosixRegex<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl<'a> Send for PosixRegex<'a>
impl<'a> Send for PosixRegex<'a>
impl<'a> Sync for PosixRegex<'a>
impl<'a> Sync for PosixRegex<'a>