The try
command matches a regular expression against the input string.
Try Command Parameters
Argument |
Description |
---|---|
|
|
|
The regular expression to match. |
|
One or more fields to add to the result (only if the regular expression is successful). |
Try Command Sample
|
In the above example, we try to match the regular expression ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)
that looks at the entire log (parse_from (start_position)
) - parse from the start of the log). If the regular expression is matched, we add a source field.