id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2340,Regex : Invalid preceding regular expression problem,jcombe@…,John Maddock,"I have the following code:- std::cout << ""BUILD REGEX"" << std::endl; try { boost::u32regex uregex= boost::make_u32regex ( ""(.*?)(\\b?\\s?)(\\w*?)&(\\w+?)(\\b\\s?&?)(.*)"" , boost::regex::perl ); } catch ( boost::regex_error x ) { std::cout << ""REGEX ERROR ["" << x.what() << ""]"" << std::endl; return false; } std::cout << ""REGEX BUILT"" << std::endl; return false; When I compile this code and then run it, it throws an exception and prints this message:- REGEX ERROR [Invalid preceding regular expression] When I use this line instead boost::u32regex uregex= boost::make_u32regex ( ""(.*?)(\\b\\s?)(\\w*?)&(\\w+?)(\\b\\s?&?)(.*)"" , boost::regex::perl ); It does work. Both regular expressions compile and run as I expect in Perl. Is it a bug that this regex does not work in Boost?",Bugs,closed,To Be Determined,regex,Boost 1.36.0,Problem,wontfix,regex,