Change \B to be the opposite of \b.

Also update docs.
Fixes https://github.com/boostorg/regex/issues/123.
This commit is contained in:
jzmaddock
2021-10-07 18:52:27 +01:00
parent 78bf0acd20
commit 10cff29314
4 changed files with 18 additions and 1 deletions

View File

@ -471,6 +471,11 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
template <class BidiIterator, class Allocator, class traits>
bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
{
bool b = !match_word_boundary();
if(b)
pstate = pstate->next.p;
return b;
/*
if(position == last)
return false;
// both prev and this character must be m_word_mask:
@ -492,6 +497,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
}
}
return false;
*/
}
template <class BidiIterator, class Allocator, class traits>