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 regex replace extractor #1485

Merged
merged 1 commit into from Oct 14, 2015
Merged

Add regex replace extractor #1485

merged 1 commit into from Oct 14, 2015

Conversation

@joschi
Copy link
Contributor

@joschi joschi commented Oct 13, 2015

This PR adds an extractor which supports replacing a message field with a constant value or the matches of a regular expression.

Similar to the already existing Regex extractor, this extractor tries to match a regular expression against a message field (see Pattern) and replaces its value (or the value of the target field) with the string configured in the "replacement" setting (see Matcher#replaceAll()). The extractor also allows to only replace the first match or all matches (default).

Supersedes #1466.

@edmundoa
Copy link
Member

@edmundoa edmundoa commented Oct 14, 2015

LGTM 👍

edmundoa added a commit that referenced this pull request Oct 14, 2015
@edmundoa edmundoa merged commit 399bc06 into 1.3 Oct 14, 2015
3 checks passed
3 checks passed
@garybot2
ci Jenkins build graylog2-server-integration-pr 277 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@edmundoa edmundoa deleted the replace-extractor branch Oct 14, 2015
edmundoa added a commit that referenced this pull request Oct 14, 2015
Add regex replace extractor
(cherry picked from commit 399bc06)
@edmundoa
Copy link
Member

@edmundoa edmundoa commented Oct 14, 2015

Also cherry-picked it to master.

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

Successfully merging this pull request may close these issues.

None yet

2 participants