Skip to content

matching the contents of a delimited string that can contain the delimiters #312

Answered by d-frey
rowlesmr asked this question in Q&A
Discussion options

You must be logged in to vote

You might try something like:

struct textcontent : pegtl::until<at<end_sep>> {};
struct textstring : pegtl::if_must<sep, textcontent, end_sep> {};

Add the action to textcontent and it will not contain the surrounding separators.

Replies: 1 comment 3 replies

Comment options

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

@rowlesmr
Comment options

@rowlesmr
Comment options

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