Skip to content

Expression repetition with .. is too greedy when something optional comes after it #579

Answered by hildjj
dhhyi asked this question in Q&A
Discussion options

You must be logged in to vote

That doesn't match '123ga' as a word. If you'd like it to, you can add some more complexity:

Word "word"
  = !(Weight (EOF / _ ",")) @$[A-Za-z0-9]+

EOF
  = !.

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
3 replies
@dhhyi
Comment options

@lorenmh
Comment options

@dhhyi
Comment options

Comment options

You must be logged in to vote
3 replies
@hildjj
Comment options

Answer selected by dhhyi
@dhhyi
Comment options

@hildjj
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants