Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for user defined separator for name-value-list #322

Open
preyniers opened this issue May 19, 2019 · 0 comments
Open

Add support for user defined separator for name-value-list #322

preyniers opened this issue May 19, 2019 · 0 comments

Comments

@preyniers
Copy link

The undocumented "named-value-list" should support a user defined separator. According to "parser.c", the only value supported is whitespace, which supports statements, such as:

foo=foo message bar=bar message

A user defined separator should be allow to support use cases where the value separator is other than whitespace (e.g. comma), such as:

foo=foo message,bar=bar message

An even more flexible scenario would allow for defining both key separator (nvlkey-sep) and value separator (nvlval-sep). This would allow for syntax, such as:

rule=example:%[ { "type" : "name-value-list", "name" : "foo", "nvlkey-sep" : ":", "nvlval-sep" : "," }, { "type" : "rest", "name" : "_unparsed" } ]%

Matching more advanced scenarios, such as:

foo:foo message,bar:bar message

--phil r.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant