mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
31 lines
388 B
TypeScript
31 lines
388 B
TypeScript
// with modifiers
|
|
/(abc)\//ig;
|
|
|
|
// without modifiers
|
|
/(abc)\//;
|
|
|
|
// can be assigned
|
|
var re = /(abc)\//ig;
|
|
|
|
// generally behaves like an expression
|
|
var noRe = !/(abc)\//i;
|
|
|
|
// inner line break is unterminated
|
|
/a
|
|
b/ig;
|
|
|
|
// just a comment
|
|
//ig;
|
|
|
|
// duplicate flags
|
|
|
|
/(abc)\//iig;
|
|
|
|
// invalid flags
|
|
|
|
/(abc)\//iX;
|
|
|
|
// surrounding AST remains intact
|
|
|
|
false && /abc/gX.test(someString) || true;
|