Expanding a comment for one section in greater detail.
git-svn-id: svn://10.0.0.236/trunk@125224 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
55dbf25c70
commit
5fb9b41f57
@ -1803,6 +1803,15 @@ addThis();
|
||||
/*
|
||||
* MODIFIED - ECMA has different rules for paren contents. Note
|
||||
* this regexp has two non-capturing parens, and one capturing
|
||||
*
|
||||
* The issue: shouldn't the match be ['ab', undefined]? Because the
|
||||
* '\1' matches the undefined value of the second iteration of the '*'
|
||||
* (in which the 'b' part of the '|' matches). But Perl wants ['ab','b'].
|
||||
*
|
||||
* Answer: waldemar@netscape.com:
|
||||
*
|
||||
* The correct answer is ['ab', undefined]. Perl doesn't match
|
||||
* ECMAScript here, and I'd say that Perl is wrong in this case.
|
||||
*/
|
||||
status = inSection(241);
|
||||
pattern = /^(?:b|a(?=(.)))*\1/;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user