Skip to content

Unexpected match failure #234

Closed
Closed
@SeanRBurton

Description

@SeanRBurton

I'm not sure if I'm doing something wrong, but I think this should match. It seems the issue is that '\u{f1}' is not valid ascii, and it's unclear from the docs what the behaviour should be here, but in re_builder.rs the byte builder is defined such that 'only_utf8' is false.

extern crate regex;                                                             

fn main() {                                                                     
    let re = regex::bytes::Regex::new(&"(?su:.)(?s-u:.)(?su:.)").unwrap();      
    let s = "\u{decb1}\u{f1}\u{d70ab}";  
    // prints 'None'                                       
    println!("{:?}", re.captures(&s.as_bytes()));                               
}                                                                               

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions