Edge Delta Regex Testing

Build and test regex patterns for use in your pipeline nodes.

Overview

Regex patterns can be difficult to write due to differences in regex flavors. For example, Edge Delta uses Golang regexp, which might not perfectly recognize patterns developed for Perl Compatible Regular Expressions (PCRE). To assist with this, you can select out of the box patterns for common use cases. You can also use the Regex tester in the node testing pane to develop and test regex patterns against actual log samples.

Use Out of the Box Patterns

  1. Click Edit Mode.
  2. Create the node that performs the function you want using regex, for example click Add Processor, expand Filters and select Regex Filter.
  3. Select a common regex pattern from the list in the Pattern field

Write and Test Regex Patterns

To start you should collect log samples that are representative of those emitted by your environment. You can test them in the regex tester:

  1. Click Edit Mode.
  2. Create the node that performs the function you want using regex, for example click Add Processor, expand Filters and select Regex Filter.
  3. Click the Regex Library icon on the Patterns field.
  4. You can select the out of the box patterns and view log samples designed to illustrate their function. Alternatively paste your sample logs in the Sample Logs field and write your custom regex pattern in the Regular Expression field.

LLMs can assist in writing regex patterns but they need to be confirmed against the Golang Regexp flavor in the Edge Delta Regex tester.

The Matches pane highlights the parts of your log samples that are matched by the pattern.

  1. Click Copy Regex then click Cancel to close the regex tester.
  2. Paste the regex pattern in the Patterns field.

You should paste your sample logs in the Samples section of the node testing pane and click Process Samples.

This provides a view of the results of the node’s regex processing in the context of the data item:

For more information on node testing see Designing Pipelines and Testing Nodes.

See Also: