summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/regex/regex.cpp3
-rw-r--r--vespalib/src/vespa/vespalib/regex/regex.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/regex/regex.cpp b/vespalib/src/vespa/vespalib/regex/regex.cpp
index 3229365b753..fcae9b3f11a 100644
--- a/vespalib/src/vespa/vespalib/regex/regex.cpp
+++ b/vespalib/src/vespa/vespalib/regex/regex.cpp
@@ -58,6 +58,9 @@ Regex Regex::from_pattern(std::string_view pattern, uint32_t opt_mask) {
if ((opt_mask & Options::IgnoreCase) != 0) {
opts.set_case_sensitive(false);
}
+ if ((opt_mask & Options::MultiLine) != 0) {
+ opts.set_dot_nl(true);
+ }
return Regex(std::make_shared<const Impl>(pattern, opts));
}
diff --git a/vespalib/src/vespa/vespalib/regex/regex.h b/vespalib/src/vespa/vespalib/regex/regex.h
index 4382d057252..01207ee3e49 100644
--- a/vespalib/src/vespa/vespalib/regex/regex.h
+++ b/vespalib/src/vespa/vespalib/regex/regex.h
@@ -44,7 +44,8 @@ public:
// TODO consider using type-safe parameter instead.
enum Options {
None = 0,
- IgnoreCase = 1
+ IgnoreCase = 1,
+ MultiLine = 2
};
~Regex();