Skip to content

RegexBuilder should document that it does not incorporate flags into string-representation #246

Closed
@lukaslueg

Description

@lukaslueg

AFAICS regex::RegexBuilder does not incorporate flags into the string representation of the final regex.

let re = regex::RegexBuilder::new("foo").case_insensitive(true).compile().unwrap();
assert_eq!(re.as_str(), "(?i)foo");

panics because "foo" != "(?i)foo".

Am I confused about something here? Otherwise this should at least be documented :-)

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