Struct regex_dfa::Regex
[−]
[src]
pub struct Regex { // some fields omitted }
Methods
impl Regex
[src]
fn new(re: &str) -> Result<Regex>
[−]
Creates a new Regex
from a regular expression string.
fn new_bounded(re: &str, max_states: usize) -> Result<Regex>
[−]
Creates a new Regex
from a regular expression string, but only if it doesn't require too
many states.
fn find(&self, s: &str) -> Option<(usize, usize)>
[−]
Returns the index range of the first match, if there is a match. The indices returned are byte indices of the string. The first index is inclusive; the second is exclusive.