Struct pcre::Match
[−]
[src]
pub struct Match<'a> { /* fields omitted */ }
Represents a match of a subject string against a regular expression.
Methods
impl<'a> Match<'a>
[src]
fn group_start(&self, n: usize) -> usize
Returns the start index within the subject string of capture group n
.
If the capture group is present in the pattern but wasn't captured then the start of it will be usize::max_value()
.
Happens with the optional groups, /(optional)?/
.
fn group_end(&self, n: usize) -> usize
Returns the end index within the subject string of capture group n
.
If the capture group is present in the pattern but wasn't captured then the end of it will be usize::max_value()
.
Happens with the optional groups, /(optional)?/
.
fn group_len(&self, n: usize) -> usize
Returns the length of the substring for capture group n
.
fn group(&self, n: usize) -> &'a str
Returns the substring for capture group n
as a slice.
fn string_count(&self) -> usize
Returns the number of substrings captured.