pub struct Regex { /* private fields */ }Implementations§
Source§impl Regex
impl Regex
pub fn new(pattern: &str) -> Result<Self, RegexError>
pub fn new_with_flags( pattern: &str, flags: RegexFlags, ) -> Result<Self, RegexError>
pub fn with_flags(pattern: &str, flags: &str) -> Result<Self, RegexError>
pub fn pattern(&self) -> &str
pub fn flags(&self) -> RegexFlags
pub fn find<'a>(&self, input: &'a str) -> Option<MatchResult<'a>>
pub fn find_at<'a>( &self, input: &'a str, start: usize, ) -> Option<MatchResult<'a>>
pub fn find_all<'a>(&self, input: &'a str) -> Vec<MatchResult<'a>>
pub fn is_match(&self, input: &str) -> bool
pub fn is_full_match(&self, input: &str) -> bool
pub fn replace<'a>(&self, input: &'a str, replacement: &str) -> String
pub fn replace_all<'a>(&self, input: &'a str, replacement: &str) -> String
pub fn replace_n<'a>( &self, input: &'a str, replacement: &str, n: usize, ) -> String
pub fn replace_fn<'a, F>(&self, input: &'a str, f: F) -> String
pub fn capture_count(&self) -> usize
Trait Implementations§
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