I've noticed that std::regex in C++11 doesn't support a `multiline` mode, as described in ECMA-262. With multiline mode, the meta-characters `^` and `$` match the beginning of line and end of line, in addition to the beginning and end of the string.
Was there a reason that multiline was omitted from the standard?
I've noticed that std::regex in C++11 doesn't support a `multiline` mode, as described in ECMA-262. With multiline mode, the meta-characters `^` and `$` match the beginning of line and end of line, in addition to the beginning and end of the string.Was there a reason that multiline was omitted from the standard? The ECMA-262 spec has an unambiguous definition of `LineTerminator` which treats a CR-LF as an empty line.
On Sunday, July 21, 2013 10:14:25 PM UTC+1, William Fisher wrote:I've noticed that std::regex in C++11 doesn't support a `multiline` mode, as described in ECMA-262. With multiline mode, the meta-characters `^` and `$` match the beginning of line and end of line, in addition to the beginning and end of the string.
Can match_not_bol and match_not_eol be used to do something approximately similar, so ^ and $ match the beginning and end of lines, not the string?
Was there a reason that multiline was omitted from the standard?
The answer is almost certainly "because it wasn't proposed" and the reason it wasn't proposed is almost certainly because it isn't in Boost.Regex, or wasn't in Boost.Regex when that was proposed for TR1.