pragmatic-segmenter 0.1.1

Rust port of pySBD v3.1.0.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use onig::{Error, Regex, RegexOptions, Syntax};

pub fn re(regex: &str) -> Result<Regex, Error> {
    Ok(Regex::with_options(
        regex,
        RegexOptions::REGEX_OPTION_NONE,
        Syntax::ruby(),
    )?)
}

pub fn re_i(regex: &str) -> Result<Regex, Error> {
    Ok(Regex::with_options(
        regex,
        RegexOptions::REGEX_OPTION_IGNORECASE,
        Syntax::ruby(),
    )?)
}