Function neure::re::not

source ·
pub fn not<T>(re: T) -> RegexNot<T>
Expand description

Return a regex that reverses the result of re. It will return zero-length Span when matches.

Example

    let re = re::not("]]]");
    let mut ctx = CharsCtx::new("[123,456,789]");

    assert_eq!(ctx.try_mat(&re)?, Span::new(0, 0));
    Ok(())