From 860a77f33c201e87e09bb6dab8bb73f887607d9b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 21 Aug 2020 16:19:08 +0200 Subject: [PATCH] propedit: fix wrong regex from switch to PCRE2 --- src/propedit/attachment_target.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/propedit/attachment_target.cpp b/src/propedit/attachment_target.cpp index 6c892d6b6..5e1503bc8 100644 --- a/src/propedit/attachment_target.cpp +++ b/src/propedit/attachment_target.cpp @@ -127,13 +127,13 @@ attachment_target_c::parse_spec(command_e command, auto offset = 0u; if (ac_replace == m_command) { - // captures: 1 2 3 4 5 6 - s_spec_re = mtx::regex::jp::Regex{"^(?:(=)?(\\d+):(.+))|(?:(name|mime-type):([^:]+):(.+))$", "i"}; + // captures: 1 2 3 4 5 6 + s_spec_re = mtx::regex::jp::Regex{"^(?:(?:(=)?(\\d+):(.+))|(?:(name|mime-type):([^:]+):(.+)))$", "i"}; offset = 1; } else if (mtx::included_in(m_command, ac_delete, ac_update)) - // captures: 1 2 3 4 - s_spec_re = mtx::regex::jp::Regex{"^(?:(=)?(\\d+))|(?:(name|mime-type):(.+))$", "i"}; + // captures: 1 2 3 4 + s_spec_re = mtx::regex::jp::Regex{"^(?:(?:(=)?(\\d+))|(?:(name|mime-type):(.+)))$", "i"}; else assert(false);