This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
Section: 28.13 [re.grammar] Status: Resolved Submitter: Nayuta Taga Opened: 2013-10-30 Last modified: 2017-03-13
View other active issues in [re.grammar].
View all other issues in [re.grammar].
View all issues with Resolved status.
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:
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 22.214.171.124, 126.96.36.199:
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 28.5.2 [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:
Visual Studio Express 2013
[2015-05-22, Daniel comments]
This issue interacts with LWG 2503.
Resolving 2503 will resolve this as well.
Resolved by LWG 2503.