Regex icon indicating copy to clipboard operation
Regex copied to clipboard

Incorrect handling of dashes inside character classes

Open ju1ius opened this issue 7 years ago • 1 comments

Hi again :wink:,

Parsing the pattern [\w-] throws Unexpected token "-" (range) at line 1 and column 4. When encountered at the last position of a character class, a dash should produce a token with the value "-".


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

ju1ius avatar Jan 17 '18 03:01 ju1ius

Thanks for the report!

https://github.com/hoaproject/Regex/pull/33/commits/e770ada2e9f52b86c8c52f5eb12f3c4b3f9dbd0f fixes the issue. Can you test on your use case please?

Hywan avatar Jan 22 '18 09:01 Hywan