Created on 2013-10-30.00:00:00 last changed 100 months ago
Proposed resolution:
Resolved by LWG 2503.
[ 2016-08 Chicago ]
Resolving 2503 will resolve this as well.
[ 2015-05-22, Daniel comments ]
This issue interacts with LWG 2503.
In the following "Multiline" is the value of the ECMA-262 RegExp object's multiline property.
In ECMA-262, there are some definitions that relate to Multiline:ECMA-262 15.10.2.6:
If Multiline is true, ^ matches just after LineTerminator.
If Multiline is false, ^ does not match just after LineTerminator. If Multiline is true, $ matches just before LineTerminator. If Multiline is false, $ does not match just before LineTerminator.
ECMA-262 15.10.4.1, 15.10.7.4:
By default, Multiline is false.
So, the C++11 standard says that Multiline is false. As it is false, ^ matches only the beginning of the string, and $ matches only the end of the string.
However, two flags are defined in [re.matchflag] Table 139:match_not_bol: the character ^ in the regular expression shall not match [first,first).
match_not_eol: the character "$" in the regular expression shall not match [last,last).
As Multiline is false, the match_not_bol and the match_not_eol are meaningless because they only make ^ and $ match none.
In my opinion, Multiline should be true. FYI, Multiline of the existing implementations are as follows: Multiline=false:libstdc++ r206594
libc++ r199174
Multiline=true:
Visual Studio Express 2013
boost 1.55
History | |||
---|---|---|---|
Date | User | Action | Args |
2016-08-08 15:33:15 | admin | set | messages: + msg8462 |
2016-08-08 15:33:15 | admin | set | status: ready -> resolved |
2016-08-02 17:19:11 | admin | set | messages: + msg8327 |
2016-08-02 17:19:11 | admin | set | status: new -> ready |
2015-05-22 17:49:36 | admin | set | messages: + msg7423 |
2013-10-30 00:00:00 | admin | create |