onig 0.3.2

Rust-Onig is a set of rust bindings for the oniguruma regular expression library.
Documentation

Rust Onig

Build Status

Rust bindings for the Oniguruma regex library.

Documentation

This crate is still under development at the moment.

Example of usage

use onig::Regex;

let regex = Regex::new("e(l+)").unwrap();
for (i, pos) in regex.captures("hello").unwrap().iter_pos().enumerate() {
    match pos {
         Some((beg, end)) =>
             println!("Group {} captured in position {}:{}", i, beg, end),
         None =>
             println!("Group {} is not captured", i)
    }
}

Rust Onig is Open Source

The contents of this repository are distributed under the MIT license. See LICENSE for more details.