You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was under the impression that the string representation would by equivalent to the pattern and the flags set on RegexBuilder. That is, given ::new('foo') and .case_insensitive(true), the string representation is (?i)foo.
Consume the builder and compile the regular expression.
Note that the resulting `Regex::as_str()` returns the verbatim pattern given to `RegexBuilder::new()` without incorporating the flags set thereafter.
BurntSushi
changed the title
RegexBuilder does not incorporate flags into string-representation
RegexBuilder should document that it does not incorporate flags into string-representation
Jul 10, 2016
AFAICS
regex::RegexBuilder
does not incorporate flags into the string representation of the final regex.panics because
"foo" != "(?i)foo"
.Am I confused about something here? Otherwise this should at least be documented :-)
The text was updated successfully, but these errors were encountered: