Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match words using unicode property matching #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgmeyers
Copy link
Contributor

Feel free to close this if it's not in line with your vision of things, but this seems to be an effective solve for #55.

This uses unicode property matching to simplify word matching (see https://javascript.info/regexp-unicode)

/P{Z}* -> Matches 0 or more of anything that is not a separator (eg, space, tab, newline)
[\p{L}\p{N}] -> Matches anything that is a letter or a number

This is based on @jon-heard 's algorithm, and defines a word as anything that contains at least one letter or a number (as defined by the host language) and no spaces/tabs/etc...

@rzfzr
Copy link

rzfzr commented Mar 24, 2024

@lukeleppan Is anybody else accepting prs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants