How to consume head of a string? #958
-
I'm writing a lexer that needs to consume the head of a string based on a pattern. For example, for
Which method on |
Beta Was this translation helpful? Give feedback.
Answered by
BurntSushi
Feb 20, 2023
Replies: 2 comments 2 replies
-
Change your regex to |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
oovm
-
You are right, I found that what I encountered was due to double escaping, thank you |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change your regex to
^[1-9]+
?