This filter searches or extracts strings from the received Message. It can be used with a regular expression or a simple string.
If the string is found, the condition is matched and the Message is propagated to the next filter.
|target||STRING||“main”||the field of the Message that should be used for the filter (it could be main or and extra field)|
|regexp||BOOL||false||the pattern field is a regular expression|
|extract||BOOL||“false”||if “true” the |
|pattern||STRING||empty||specifies the pattern that should be matched on the Message to check the condition|
... | text(target="description", pattern="(#[^\\s]+)", regexp="true", extract="true") | ...
extract parameter is “false”, the received Message will be propagated only if the specified
pattern is matched in the
target field of the Message.
extract is “true” (only
regexp can be used in this case), and one or more strings matches with the pattern, the
main field of the propagated Message will contain only the matched string.
extract parameter is “true” and the message is propagated, a new extra field is created:
fulltext will contain the original