[Boost-bugs] [Boost C++ Libraries] #2518: RegEx with $ anchor not Perl-compatible

Subject: [Boost-bugs] [Boost C++ Libraries] #2518: RegEx with $ anchor not Perl-compatible
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-11-19 21:07:18


#2518: RegEx with $ anchor not Perl-compatible
--------------------------------------------------+-------------------------
 Reporter: Chad Martin <chad.e.martin_at_[hidden]> | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: regex
  Version: Boost 1.37.0 | Severity: Problem
 Keywords: |
--------------------------------------------------+-------------------------
 If I try to match a string like "WORD1 WORD2" with boost::regex
 lastWordCapture("(\\w+)$"); in order to capture WORD2, the regex_match
 fails. If I modify the regex to ".*?(\\w+)$", it works fine. The
 following Perl code captures and prints WORD2 as expected.

 $string = "WORD1 WORD2";
 if ($string =~ /(\w+)$/){
     print "$1\n";
 }

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/2518>
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:49:59 UTC