Closure compiler doesn't recognize `\u{XXXX}` in regular expression
See original GitHub issueThe following code:
let x = /\u{ffff}/u;
would yield:
WARNING - [JSC_MALFORMED_REGEXP] Malformed Regular Expression: {ffff}
from closure compiler, but it’s a valid regular expression, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Support for ES2018 Regular Expressions · Issue #3028 - GitHub
We've done all we plan to do for supporting the RegExp features added in ES_2018 . closure-compiler will recognize them and not choke...
Read more >javascript - Regular expression to match non-ASCII characters?
This should do it: [^\x00-\x7F]+. It matches any character which is not contained in the ASCII character set (0-127, i.e. 0x0 to 0x7F)....
Read more >New src/share/classes/java/util/regex/Pattern.java
40 * 41 * <p> A regular expression, specified as a string, must first be compiled into 42 * an instance of this...
Read more >A tour of the Dart language
This page shows you how to use each major Dart feature, from variables and operators to classes and libraries, with the assumption that...
Read more >Changelog for Groovy 1.0.0
does not work properly; [GROOVY-1072] - void.class is not recognized by groovy ... regex support; [GROOVY-613] - global properties referenced from closure ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds good. Thanks!
I stand by my advice in https://github.com/google/closure-compiler/issues/3563#issuecomment-593548756 on where I’d recommend starting.
Sure, the
parsing
package is the right place to look. I’d start with a unit test in: https://github.com/google/closure-compiler/blob/master/test/com/google/javascript/jscomp/parsing/ParserTest.java