From b031ef4a7d775e783f43b7b603d9c5b9261442af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 28 Nov 2024 15:51:06 +0100
Subject: [PATCH] Minor simplification of regexp for half-years in native
 statements

---
 src/Statement.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Statement.cc b/src/Statement.cc
index f896254d..1f1079d7 100644
--- a/src/Statement.cc
+++ b/src/Statement.cc
@@ -49,7 +49,7 @@ NativeStatement::writeOutput(ostream& output, [[maybe_unused]] const string& bas
      otherwise 2023M12 will be matched as 2023M1 (see dynare#1918). Technically, it seems that
      boost::xpressive does not look for the longest match in an alternation, but stops at the first
      match from left to right. */
-  string date_regex = R"((-?\d+([YyAa]|[Mm](1[0-2]|[1-9])|[Qq][1-4]|[SsHh][1-2])))";
+  string date_regex = R"((-?\d+([YyAa]|[Mm](1[0-2]|[1-9])|[Qq][1-4]|[SsHh][12])))";
   /* NB: the following dance around the dollar sign (exclude it from lookbehind, then use it in a
      temporary string after the first replace, then remove it in the second replace) has a purpose:
      it allows the user to disable the substitution mechanism. For example, if the user writes
-- 
GitLab