Subject: [Boost-bugs] [Boost C++ Libraries] #9380: regex return empty submatch on some machines/compilers
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-11-13 08:45:14
#9380: regex return empty submatch on some machines/compilers
-----------------------------------------+-------------------------
Reporter: Jannich Thorsen <jannich@â¦> | Owner: johnmaddock
Type: Bugs | Status: new
Milestone: To Be Determined | Component: regex
Version: Boost 1.55.0 | Severity: Problem
Keywords: |
-----------------------------------------+-------------------------
Upgraded to 1.55.0 and now this regex fails on our 32bit Ubuntu, but still
works fine on our 64bit Ubuntu and RedHat variants.
Configuration is: Ubuntu 8.04.4 LTS, 32bit, gcc 4.2.4
{{{
bool parseBusName(const std::string& busName) const {
boost::regex regularExpressionBus ("^([^\[]+)\[([0-9]+)-([0-9]+)\]",
boost::regex::extended);
boost::cmatch w;
if(!regex_match(busName.c_str(), w, regularExpressionBus))
return false;
std::cerr << w.size() << " >" << w[1] << "< >" << w[2] << "< >" <<
w[3] << "<" << std::endl;
return true;
}
parseBusName("top[0-1]")
output is: 4 >< >< ><
expected: 4 >top< >0< >1<
}}}
We where previously running boost 1.48.0 which worked fine on all our
configurations.
NOTE: Replacing boost::regex::extended with boost::regex::perl makes the
test pass again on 32bit/gcc4.2.4.
Thanks,
Jannich
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9380> 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:14 UTC