data Match
A match: the matched text and its byte range [start, end) in the searched text.
Example:
fn main() io {
let re = Regex.compile("[a-z]+")!
let m = re.find("123 abc 456")!
print("{m.text} {m.start} {m.end}")
}Output
abc 4 7
@derive(Eq)
pub(api) data MatchSince. 1.0.0-beta
Fields
pub(api) text: str | The matched text. |
pub(api) start: usize | Byte offset of the start of the match. |
pub(api) end: usize | Byte offset after the end of the match. |
Defined in: std/core/text.oxl:1115