Skip to content

Commit

Permalink
Explicitly state that flags aren't incorporated into the pattern string.
Browse files Browse the repository at this point in the history
Fixes #246.
  • Loading branch information
BurntSushi committed Jul 9, 2016
1 parent 9062f38 commit e55c7ed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/re_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ impl RegexBuilder {
}

/// Consume the builder and compile the regular expression.
///
/// Note that calling `as_str` on the resulting `Regex` will produce the
/// pattern given to `new` verbatim. Notably, it will not incorporate any
/// of the flags set on this builder.
pub fn compile(self) -> Result<Regex, Error> {
ExecBuilder::new_options(self.0)
.only_utf8($only_utf8)
Expand Down

0 comments on commit e55c7ed

Please sign in to comment.