dmulyalin / ttp

Template Text Parser
MIT License
351 stars 34 forks source link

Include Regex Pattterns from grok #115

Open mardukbp opened 11 months ago

mardukbp commented 11 months ago

grok is a Logstash filter with a similar functionality to TTP. It includes a list of commonly used regex patterns.

This would be a nice addition to TTP. Thank you for writing this awesome library!

dmulyalin commented 10 months ago

Its fairly easy to add new regexes, need to add them into this file - https://github.com/dmulyalin/ttp/blob/master/ttp/patterns/get_pattern.py - can add a few if you have a need for any particular of them but I am personally has no need for all grok regexes, besides, match variable re function allows to source your own regexes, including from variables or local files.

If you feel like to, maybe you can raise a pull request and add new patterns to above file, but also need to add tests for each new regex and update documentation accordingly.