mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
313 B
18 lines
313 B
12 years ago
|
/*
|
||
|
* Empty alternatives match and capture empty groups.
|
||
|
*/
|
||
|
|
||
|
var t;
|
||
|
|
||
|
/*===
|
||
|
string string undefined
|
||
|
===*/
|
||
|
|
||
|
/* The first alternative will match and capture the empty string.
|
||
|
* The second alternative is not tried and capture is undefined.
|
||
|
*/
|
||
|
|
||
|
t = /()|()/.exec('');
|
||
|
print(typeof t[0], typeof t[1], typeof t[2]);
|
||
|
|