[Boost-bugs] [Boost C++ Libraries] #3899: Regex: Bug in handling of "\Z"

Subject: [Boost-bugs] [Boost C++ Libraries] #3899: Regex: Bug in handling of "\Z"
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-02-04 15:27:47


#3899: Regex: Bug in handling of "\Z"
-------------------------------------------------+--------------------------
 Reporter: Keith MacDonald <keith@…> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: None
  Version: Boost 1.42.0 | Severity: Problem
 Keywords: |
-------------------------------------------------+--------------------------
 Bug in handling of "\Z"

 According to the documentation, the RE "\Z" is equivalent to "\n*\z", but
 it behaves differently. Given the text:

 {{{
 1\r
 2\r
 \r
 }}}

 Replacing all instances of "\n*\z" with "A" correctly results in:

 {{{
 1\r
 2\r
 \r
 A
 }}}

 Whereas replacing all instances of "\Z" with "A" incorrectly results in:

 {{{
 1\r
 2A\r
 A\r
 A
 }}}

 It does not seem to differentiate between "\r" and "\n", nor to correctly
 recognize the end of the buffer.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3899>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC