Skip to content
This repository was archived by the owner on Jun 6, 2018. It is now read-only.

Added Unicode category support - #11

Open
cmkilger wants to merge 2 commits into
javallone:masterfrom
cmkilger:master
Open

Added Unicode category support#11
cmkilger wants to merge 2 commits into
javallone:masterfrom
cmkilger:master

Conversation

@cmkilger

@cmkilger cmkilger commented Jun 6, 2015

Copy link
Copy Markdown

I added support for Unicode categories, as listed on this site, e.g. \p{P} for punctuation or \p{Cherokee} for Cherokee characters. I'm not sure how you would actually want to do this, so I just went for it. It doesn't verify to make sure that the value used and just assumes it is available. And it uses some heuristics to try and format it properly.

If you'd rather, all possible values could be added to the grammar, and then there could be a big map to the descriptions of each one.

@javallone

Copy link
Copy Markdown
Owner

Thank you for this change.

As far as I can tell, Unicode categories aren't supported by JavaScript-style regular expressions (which is all that Regexper supports at this time), so I'm not going to merge this right now. I will keep this change around though for when other regex styles are added to the site.

@cmkilger

cmkilger commented Jul 1, 2015

Copy link
Copy Markdown
Author

I assume you mean just native RegExp, but I'll just point out that XRegExp brings support for this to JavaScript. Perhaps that would be considered another style.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants