[Boost-bugs] [ boost-Bugs-1515830 ] regex_match fails, but regex_search works fine

Bugs item #1515830, was opened at 2006-07-02 05:28 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1515830&group_id=7586 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: regex Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: John Maddock (johnmaddock) Summary: regex_match fails, but regex_search works fine Initial Comment: I encountered this when I tried to upgrade from 1.32 to 1.33.1 I search through a text with regex_search, and pass the results to regex_match. I would expect them to yield the same result, but they don't. Here is a sample code: std::string pattern = "xx-{0,2}([+-][0-9])?"; boost::regex reg(pattern.begin(), pattern.end (), boost::regex::perl_syntax_group ); char* buf = "xx-- "; boost::cmatch what; regex_search(buf,what,reg, boost::regex_constants::match_default); bool match = regex_match(what[0].first, what [0].second,reg, boost::regex_constants::match_any); regex_search returns the [0,4), as I expected, but regex_match returns false! Am I doing something wrong? Is there a workaround? Thanks, Moddy. moddyt@itemfield.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1515830&group_id=7586 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Boost-bugs mailing list Boost-bugs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/boost-bugs
participants (1)
-
SourceForge.net