| This page tests invalid character ranges in character classes. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| PASS /[a-c]+/.exec("-acbd"); is ["acb"] |
| PASS /[a\-c]+/.exec("-acbd") is ["-ac"] |
| PASS /[c-a]+/.exec("-acbd"); threw exception SyntaxError: Invalid regular expression: range out of order in character class. |
| PASS /[\d-x]+/.exec("1-3xy"); is ["1-3x"] |
| PASS /[x-\d]+/.exec("1-3xy"); is ["1-3x"] |
| PASS /[\d-\d]+/.exec("1-3xy"); is ["1-3"] |
| PASS /[\d-a-z]+/.exec("az1-3y"); is ["az1-3"] |
| PASS /[\d\-x]+/.exec("1-3xy"); is ["1-3x"] |
| PASS /[x\-\d]+/.exec("1-3xy"); is ["1-3x"] |
| PASS /[\d\-\d]+/.exec("1-3xy"); is ["1-3"] |
| PASS /[\d-]+/.exec("1-3xy") is ["1-3"] |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |