Comments (2)
Notes to self, after a little more research --
Ruby already directly references the Unicode RFC. For example, for the \p{In Miscellaneous Mathematical Symbols-B}
example above, we have: https://github.com/ruby/ruby/blob/3628eae2e754a7489feebc6f41371d42d2efcf3c/enc/unicode/11.0.0/name2ctype.h#L34478-L34482
Then, there is this tool in the ruby source code to parse and map property names according to the unicode docs: https://github.com/ruby/ruby/blob/7aaf5b2878210d4df03a84be8d514a553839a5ba/tool/enc-unicode.rb and a template for decomposing the properties: https://github.com/ruby/ruby/blob/4444025d16ae1a586eee6a0ac9bdd09e33833f3c/template/unicode_norm_gen.tmpl.
Lastly, note that ruby defines its unicode version here. And, due to this, we can access it at runtime via: RbConfig::CONFIG['UNICODE_VERSION']
.
So in conclusion, I believe it should be possible to access ruby's unicode mappings which are built at compilation; probably with a native C extension. Failing that, the above code should provide enough hints to reproduce the mapping generation as part of the gem installation process if necessary.
Either way, this solution would be far superior to the current db/
folder implementation.
from regexp-examples.
Related Issues (17)
- Empty regexp examples HOT 2
- Allow the use of empty look-arounds
- Randomness regression? HOT 2
- Enhancements to absent operator examples
- Support for conditional capture groups
- Parsing of nested repeat operators
- Predictable behaviour of `max_examples_limit` option
- Support for use without class extension
- enhancement: negative examples? HOT 2
- [bug] Cannot generate examples for /__.__/ HOT 6
- use regexp_parser? HOT 6
- Hello, I am trying to use regexp-example but I have an irregular expression and it says that the gem is not compatible with looking back and looking forward, can you help me? is there any solution or do I have to modify the regex? HOT 4
- [\p{Nd}] — unicode categories in character classes
- negative unicode property via \P is not supported HOT 2
- Can a reverse abilty be made? HOT 2
- symlink unimplemented when installing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from regexp-examples.