summaryrefslogtreecommitdiffstats
path: root/libcxx/include/regex
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/regex')
-rw-r--r--libcxx/include/regex6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex
index fb0f7d8c262..bd48fb8da04 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -1947,7 +1947,8 @@ template <class _CharT>
void
__l_anchor<_CharT>::__exec(__state& __s) const
{
- if (__s.__at_first_ && __s.__current_ == __s.__first_)
+ if (__s.__at_first_ && __s.__current_ == __s.__first_ &&
+ !(__s.__flags_ & regex_constants::match_not_bol))
{
__s.__do_ = __state::__accept_but_not_consume;
__s.__node_ = this->first();
@@ -1981,7 +1982,8 @@ template <class _CharT>
void
__r_anchor<_CharT>::__exec(__state& __s) const
{
- if (__s.__current_ == __s.__last_)
+ if (__s.__current_ == __s.__last_ &&
+ !(__s.__flags_ & regex_constants::match_not_eol))
{
__s.__do_ = __state::__accept_but_not_consume;
__s.__node_ = this->first();
OpenPOWER on IntegriCloud