mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 05:42:15 +02:00
Correct behaviour of \b when matching null-strings.
See https://github.com/boostorg/regex/issues/40
This commit is contained in:
@ -476,12 +476,14 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
|
||||
}
|
||||
else
|
||||
{
|
||||
b = (m_match_flags & match_not_eow) ? true : false;
|
||||
if (m_match_flags & match_not_eow)
|
||||
return false;
|
||||
b = false;
|
||||
}
|
||||
if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
|
||||
{
|
||||
if(m_match_flags & match_not_bow)
|
||||
b ^= true;
|
||||
return false;
|
||||
else
|
||||
b ^= false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user