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

Regex #3

Open
stedes opened this issue Dec 15, 2017 · 1 comment
Open

Regex #3

stedes opened this issue Dec 15, 2017 · 1 comment

Comments

@stedes
Copy link

stedes commented Dec 15, 2017

I think the regex expression is wrong.

TOKENS_ALPHANUMERIC = '[A-Za-z0-9]+(?=\s+)'

Doesn't this mean that you only consider tokens if they contain only alphanumeric characters and are followed by white space ?

Example:
WORD1,WORD2, WORD3, WORD4 Word5

In the above sentence WORD4 and Word5 would be considered as tokens as the other words have a comma in them and as such are not valid tokens.

@tab1tha
Copy link

tab1tha commented Apr 25, 2020

I think all the WORDS will be considered as tokens. The first four will be split on the comma, and the fifth will be split on the whitespace.

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

No branches or pull requests

2 participants