Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 1bc1ce4

Browse files
committed
update README.md
1 parent 8ba47c0 commit 1bc1ce4

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

README.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[![Build Status](https://github.com/ztroop/py3grok/actions/workflows/build.yml/badge.svg)](https://github.com/ztroop/py3grok/actions/workflows/build.yml)
2+
[![codecov](https://codecov.io/gh/ztroop/py3grok/branch/master/graph/badge.svg?token=9IMVSWC2GH)](https://codecov.io/gh/ztroop/py3grok)
3+
14
# py3grok
25

36
A Python library to parse strings and extract information from structured or unstructured data. This library is based on [pygrok](https://github.com/garyelephant/pygrok).
@@ -42,23 +45,14 @@ print(grok.match(text))
4245

4346
Now `age` is of type `int` and `weight` is of type `float`.
4447

45-
Some of the pattern you can use are listed here:
46-
```
47-
`WORD` means \b\w+\b in regular expression.
48-
`NUMBER` means (?:%{BASE10NUM})
49-
`BASE10NUM` means (?<![0-9.+-])(?>[+-]?(?:(?:[0-9]+(?:\.[0-9]+)?)|(?:\.[0-9]+)))
50-
51-
other patterns such as `IP`, `HOSTNAME`, `URIPATH`, `DATE`, `TIMESTAMP_ISO8601`, `COMMONAPACHELOG`..
52-
```
53-
5448
See all available patterns [here](./py3grok/patterns)!
5549

5650
## Additional Notes
5751

58-
Beause python re module does not support regular expression syntax atomic grouping(?>),so pygrok requires [regex](https://pypi.python.org/pypi/regex) to be installed.
52+
The python `re` module does not support regular expression syntax atomic grouping `(?>)`, so pygrok requires [regex](https://pypi.python.org/pypi/regex) to be installed.
5953

6054
Grok is a simple software that allows you to easily parse strings, logs and other files. With grok, you can turn unstructured log and event data into structured data.
6155

62-
I recommend you to have a look at [logstash filter grok](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html), it explains how Grok-like thing work.
56+
I recommend you to have a look at [logstash filter grok](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html), it explains how Grok works.
6357

64-
pattern files come from [logstash filter grok's pattern files](https://github.com/logstash-plugins/logstash-patterns-core/tree/master/patterns)
58+
Pattern files come from [logstash filter grok's pattern files](https://github.com/logstash-plugins/logstash-patterns-core/tree/master/patterns)

0 commit comments

Comments
 (0)