Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2002-11-23 08:12:52


> Does the regexp work on other compilers?

Yes, I've tried with C++ Builder 6.1 with codeguard support enabled
(Borland's memory checking utility), and everything passes OK with the
following test program, can you verify that the program reproduces your
problem, and if not provide one that does. Many thanks,

John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/index.htm

test code:

#include <iostream>
#include "boost/regex.hpp"

int main(int, char**) {
      boost::regex
abc("(\\w+)=(\\{|\"([^\\t\\n\\r\\f\"].*)\"|([^\\t\\n\\r\\f]+))|\\}|\\{");
      std::string s("field_name=\"field value \" ");
      boost::smatch what;
      boost::regex_search(s, what, abc);
      std::cout << (std::string)what[0] << std::endl;
      s = "sub_message_name={";
      boost::regex_search(s, what, abc);
      std::cout << (std::string)what[0] << std::endl;
      return 0;
}


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net