Opened 5 years ago
#13446 new Bugs
\R does not match \v and \n when combined with flag no_escape_in_lists
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | regex |
Version: | Boost 1.66.0 | Severity: | Regression |
Keywords: | regex | Cc: |
Description
The following code
#include <iostream> #include <boost/regex.hpp> int main(int argc, char** argv) { auto backslashR = boost::regex("\\R", boost::regex_constants::no_escape_in_lists); std::cout << std::boolalpha; std::cout << "regex='\\R', text='\\r', match found: " << boost::regex_search("\r", backslashR) << std::endl; std::cout << "regex='\\R', text='\\n', match found: " << boost::regex_search("\n", backslashR) << std::endl; std::cout << "regex='\\R', text='\\v', match found: " << boost::regex_search("\v", backslashR) << std::endl; return 0; }
outputs
regex='\R', text='\r', match found: true regex='\R', text='\n', match found: true regex='\R', text='\v', match found: true
using boost regex v1.55 and v1.64. Using version 1.66 I get this:
regex='\R', text='\r', match found: true regex='\R', text='\n', match found: false regex='\R', text='\v', match found: false
Compiler: Visual Studio 2017, toolset=v141, VC15.5.1
Note:
See TracTickets
for help on using tickets.