Skip to content

Remove the implicit use of the regex_constants::match_any flag #252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/boost/regex/v5/regex_match.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ bool regex_match(iterator first, iterator last,
match_flag_type flags = match_default)
{
match_results<iterator> m;
return regex_match(first, last, m, e, flags | regex_constants::match_any);
return regex_match(first, last, m, e, flags);
}
//
// query_match convenience interfaces:
Expand Down Expand Up @@ -75,7 +75,7 @@ inline bool regex_match(const charT* str,
match_flag_type flags = match_default)
{
match_results<const charT*> m;
return regex_match(str, str + traits::length(str), m, e, flags | regex_constants::match_any);
return regex_match(str, str + traits::length(str), m, e, flags);
}

BOOST_REGEX_MODULE_EXPORT template <class ST, class SA, class charT, class traits>
Expand All @@ -85,7 +85,7 @@ inline bool regex_match(const std::basic_string<charT, ST, SA>& s,
{
typedef typename std::basic_string<charT, ST, SA>::const_iterator iterator;
match_results<iterator> m;
return regex_match(s.begin(), s.end(), m, e, flags | regex_constants::match_any);
return regex_match(s.begin(), s.end(), m, e, flags);
}


Expand Down
2 changes: 1 addition & 1 deletion include/boost/regex/v5/regex_search.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ bool regex_search(BidiIterator first, BidiIterator last,

match_results<BidiIterator> m;
typedef typename match_results<BidiIterator>::allocator_type match_alloc_type;
BOOST_REGEX_DETAIL_NS::perl_matcher<BidiIterator, match_alloc_type, traits> matcher(first, last, m, e, flags | regex_constants::match_any, first);
BOOST_REGEX_DETAIL_NS::perl_matcher<BidiIterator, match_alloc_type, traits> matcher(first, last, m, e, flags, first);
return BOOST_REGEX_DETAIL_NS::factory_find(matcher);
}

Expand Down