pub struct Regex { /* private fields */ }Expand description
compiled regex backed by a lazy DFA.
uses a Mutex for mutable DFA state; clone for per-thread matching.
Implementations§
Source§impl Regex
impl Regex
Sourcepub fn with_options(pattern: &str, opts: EngineOptions) -> Result<Regex, Error>
pub fn with_options(pattern: &str, opts: EngineOptions) -> Result<Regex, Error>
compile with custom options.
Sourcepub fn from_node(
b: RegexBuilder,
node: NodeId,
opts: EngineOptions,
) -> Result<Regex, Error>
pub fn from_node( b: RegexBuilder, node: NodeId, opts: EngineOptions, ) -> Result<Regex, Error>
build from a pre-constructed AST node.
Sourcepub fn find_all(&self, input: &[u8]) -> Result<Vec<Match>, Error>
pub fn find_all(&self, input: &[u8]) -> Result<Vec<Match>, Error>
all non-overlapping matches, left-to-right.
Sourcepub fn effects_debug(&self) -> String
pub fn effects_debug(&self) -> String
debug: dump rev DFA effects_id and effects.
Sourcepub fn collect_rev_nulls_debug(&self, input: &[u8]) -> Vec<usize>
pub fn collect_rev_nulls_debug(&self, input: &[u8]) -> Vec<usize>
debug: run only the reverse DFA, return null positions.
Auto Trait Implementations§
impl !Freeze for Regex
impl RefUnwindSafe for Regex
impl Send for Regex
impl Sync for Regex
impl Unpin for Regex
impl UnsafeUnpin for Regex
impl UnwindSafe for Regex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more