rx
logstash-patterns
rx | logstash-patterns | |
---|---|---|
1 | 4 | |
3 | 233 | |
- | 0.0% | |
3.1 | 2.1 | |
6 months ago | about 1 year ago | |
Rust | Python | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rx
-
A portable, modern regular expression language
I had a similar kind of idea for a long time, which I put into action a few weeks ago via a standalone transpiler of Emacs' rx macro to common regexp syntaxes.[0] I ended up getting interrupted and didn't completely finish it, but it generally works, though is probably riddled with edge cases.
The basic idea of rx is to use S-expressions to describe regular expressions, and my elevator pitch would've been to embed rx invocations in shell scripts using $(syntax), the main use case being something like sed invocations.
I still think it's a neat idea, and complex regular expressions tend to be hard to parse for humans.
[0]: https://github.com/sulami/rx
logstash-patterns
- Grok filter working in online debuggers but not in actual implementation
-
A portable, modern regular expression language
Why don't languages have grok patterns in their standard libraries?
It seems to only exist in log parsing ecosystems but this really helps with getting rid of little bugs and wrong parsing of specific regex patterns.
Instead of doing "^\d+(\.\d+){3}$" for IP checking which is clearly wrong, you'd do "%{IPV4:ip}" which is so much better.
List of known patterns : https://github.com/hpcugent/logstash-patterns/blob/master/fi...
Even for PHP a third party library only has 15 stars.
-
Dissect pattern help
in case you haven't, it can be found here. https://github.com/hpcugent/logstash-patterns/blob/master/files/grok-patterns
-
Writing an effective GROK pattern
Also, some of the patterns can be referred from https://github.com/hpcugent/logstash-patterns/blob/master/files/grok-patterns I personally prefer the above link for constructing grok pattern.
What are some alternatives?
fluent-plugin-grok-parser - Fluentd's Grok parser
logstash-patterns-core
common-regex - Most common regex
JSVerbalExpressions - JavaScript Regular expressions made easy
oil - Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
ReadableRegex.jl - regexes for people who don't really want to learn or read regexes
kbnf - KBNF has been renamed to Dogma
hfst - Helsinki Finite-State Technology (library and application suite)