diff --git a/include/boost/regex/v3/regex_compile.hpp b/include/boost/regex/v3/regex_compile.hpp index 5059b5f9..82c410b1 100644 --- a/include/boost/regex/v3/regex_compile.hpp +++ b/include/boost/regex/v3/regex_compile.hpp @@ -2068,7 +2068,7 @@ unsigned int BOOST_REGEX_CALL reg_expression::fixup_le case re_detail::syntax_element_rep: if((len == 0) && (1 == fixup_leading_rep(dat->next.p, static_cast(dat)->alt.p) )) { - static_cast(dat)->leading = true; + static_cast(dat)->leading = leading_lit; return len; } return len; diff --git a/test/regress/tests.txt b/test/regress/tests.txt index 9e12a70f..1f9f1ca7 100644 --- a/test/regress/tests.txt +++ b/test/regress/tests.txt @@ -926,4 +926,8 @@ a\Z a\nb -1 -1 a()\1b ab 0 2 1 1 a()b\1 ab 0 2 1 1 +- normal match_not_dot_newline REG_NO_POSIX_TEST + +"(.*\r\n){3}.* abcdefghijklmnopqrstuvwxyz.*\r\n" "00001 01 \r\n00002 02 1 2 3 4 5 6 7 8 9 0\r\n00003 03 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\r\n00004 04 \r\n00005 05 \r\n00006 06 Seite: 0001\r\n00007 07 StartSeitEEnde: 0001\r\n00008 08 StartSeiTe Ende: 0001\r\n00009 09 Start seiteEnde: 0001\r\n00010 10 28.2.03\r\n00011 11 Page: 0001\r\n00012 12 Juhu die Erste: 0001\r\n00013 13 Es war einmal! 0001\r\n00014 14 ABCDEFGHIJKLMNOPQRSTUVWXYZ0001\r\n00015 15 abcdefghijklmnopqrstuvwxyz0001\r\n00016 16 lars.schmeiser@gft.com\r\n00017 17 \r\n00018 18 \r\n00019 19 \r\n00020 20 \r\n00021 21 1 2 3 4 5 6 7 8 9 0\r\n00022 22 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\r\n00023 01 \r\n00024 02 1 2 3 4 5 6 7 8 9 0\r\n00025 03 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890\r\n00026 04 \r\n00027 05 \r\n00028 06 Seite: 0002\r\n00029 07 StartSeitEEnde: 0002\r\n00030 08 StartSeiTe Ende: 0002\r\n00031 09 Start seiteEnde: 0002\r\n00032 10 28.02.2003\r\n00033 11 Page: 0002\r\n00034 12 Juhu die Erste: 0002\r\n00035 13 Es war einmal! 0002\r\n00036 14 ABCDEFGHIJKLMNOPQRSTUVWXYZ0002\r\n00037 15 abcdefghijklmnopqrstuvwxyz0002\r\n00038 16 lars.schmeiser@194.1.12.111\r\n00039 17 \r\n00040 18 \r\n00041 19 \r\n00042 20 \r\n00043 21 1 2 3 4 5 6 7 8 9 0\r\n" 753 1076 934 1005 +