mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 05:42:15 +02:00
Changed behaviour of \B so that it succeeds when the neither adjacent character is a word character.
[SVN r45354]
This commit is contained in:
@ -535,7 +535,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
|
||||
if(position == last)
|
||||
return false;
|
||||
// both prev and this character must be m_word_mask:
|
||||
if(traits_inst.isctype(*position, m_word_mask))
|
||||
bool prev = traits_inst.isctype(*position, m_word_mask);
|
||||
{
|
||||
bool b;
|
||||
if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
|
||||
@ -546,7 +546,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
|
||||
b = traits_inst.isctype(*position, m_word_mask);
|
||||
++position;
|
||||
}
|
||||
if(b)
|
||||
if(b == prev)
|
||||
{
|
||||
pstate = pstate->next.p;
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user