pub struct Flags {
pub icase: bool,
pub multiline: bool,
pub dot_all: bool,
pub no_opt: bool,
pub unicode: bool,
pub unicode_sets: bool,
}
Expand description
Flags used to control regex parsing. The default flags are case-sensitive, not-multiline, and optimizing.
Fields§
§icase: bool
If set, make the regex case-insensitive. Equivalent to the ‘i’ flag in JavaScript.
multiline: bool
If set, ^ and $ match at line separators, not just the input boundaries. Equivalent to the ‘m’ flag in JavaScript.
dot_all: bool
If set, . matches at line separators as well as any other character. Equivalent to the ‘m’ flag in JavaScript.
no_opt: bool
If set, disable regex IR passes.
unicode: bool
If set, the regex is interpreted as a Unicode regex. Equivalent to the ‘u’ flag in JavaScript.
unicode_sets: bool
If set, the regex is interpreted as a UnicodeSets regex. Equivalent to the ‘v’ flag in JavaScript.
Implementations§
source§impl Flags
impl Flags
sourcepub fn new<T: Iterator<Item = u32>>(chars: T) -> Self
pub fn new<T: Iterator<Item = u32>>(chars: T) -> Self
Construct a Flags from a Unicode codepoints iterator, using JavaScript field names. ‘i’ means to ignore case, ‘m’ means multiline, ‘u’ means unicode. Note the ‘g’ flag implies a stateful regex and is not supported. Other flags are not implemented and are ignored.
Trait Implementations§
source§impl From<&str> for Flags
impl From<&str> for Flags
source§fn from(s: &str) -> Self
fn from(s: &str) -> Self
Construct a Flags from a string, using JavaScript field names.
See also: Flags::new
.