javascript-unicode | unicode support for javascript
kandi X-RAY | javascript-unicode Summary
kandi X-RAY | javascript-unicode Summary
Provides support to javascript for unicode operations such as decomposition and diacritical mark removal. In order to cope with the large set of unicode data and operations with a minimal memory and network footprint, this library provides optional data loading so that only the functions needed by the application have their data loaded.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of javascript-unicode
javascript-unicode Key Features
javascript-unicode Examples and Code Snippets
Community Discussions
Trending Discussions on javascript-unicode
QUESTION
I tried matching all letter-like characters within a string using /\p{L}/ig
. However, this Unicode category doesn't seem to be supported by Nashorn's RegExp implementation.
Is there a workaround or fix for this?
Update: IMO this is not a duplicate of the referenced question: Nashorn 8 does implement ECMAScript 5.1, but since the engine runs on Java, there might be a "Java-way" to change the RegExp implementation used by the engine.
Update: I installed Java 9 (OpenJDK) which comes with Nashorn full version 9-internal+0-2016-04-14-195246
. Even when running Nashorn with ECMAScript 6 (--language=es6
), Unicode categories are not supported.
ANSWER
Answered 2018-Jan-01 at 02:23As far as I can tell, Unicode Categories are not supported by current ECMAScript RegExp specifications (up to 6.0); e.g.
Nashorn is simply implementing the ECMAScript specifications. To do otherwise would be a bug!
If you really need support for Unicode Categories and other enhancements, consider changing your Javascript code to use the XRegExp library. Alternatively, call the native Java Pattern / Matcher classes from your Javascript code. Both approaches will require code changes ....
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install javascript-unicode
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page