20 Mar
2026
20 Mar
'26
7:29 a.m.
Hi, In this regex the \n matches \r. How is this defined / controlled? Is there a way to only match \n? std::string s = "[*] A\rB\n"; s = boost::regex_replace(s, boost::regex(R"(\[\*\](.+?)(\n|$))"), "<li>\\1</li>"); std::println("{}", js_encode(s)); // <li> A</li>\rB\n Regards, -- Olaf