Stop Grabbing Text Based On A Known Keyword #279
Unanswered
HelloLudger
asked this question in
Q&A
Replies: 1 comment
-
Your charw "character with whitespace"
= !Second @[^\n\r] |
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
-
Hey,
I really love Peggy, but I can't get one thing to work. Imagine the following input:
I want to create a grammar to get the content following the titles "## First" and "## Second". The result look something like this:
The titles are fixed, always "## First" and "## Second", followed by a line break. We can assume for now, that they always exist.
I created the following grammar:
I made
s:Second
optional, because the output shows clearly the problem:If it's not optional, the error is:
Line 7, column 19: Expected "## Second", character with whitespace, or new line but end of input found.
I can't find a solution, even though I assume the problem is pretty common.
Thank you in advance,
Ludger
Beta Was this translation helpful? Give feedback.
All reactions