- 3 minutes to read

Formula - regex

Easily extract values from messages using the Nodinite regex Formula plugin. This page shows how to use regular expressions to retrieve data from message Content, or the output of other formulas.

🎯 Designed for business users and integrators β€” no developer required; you can even use AI to craft expressions.

  • βœ… Extract data from any Payload or Context in any Log Event
  • βœ… Use any valid regular expression to match single or multiple values
  • βœ… Transform and surface meaningful data in Nodinite Log Views, search filters, and self-service diagnostics
  • βœ… Combine with other Formula functions for powerful, layered expressions

What does the regex Formula do?

The regex('Expression', Content) Formula function extracts values from text using any valid regular expression. Use it on message bodies, context values, or the results from other Formula functions to surface meaningful data in your views.


How it works: Input ➜ regex ➜ Result

graph LR A["Input: Message/body/context"] --> B["regex('Expression', Content)"] B --> C["Result: Matched value(s)"]

Flow: The content is processed with a regular expression to extract one or more matched values.


Example 1 β€” Extract a number from the message body

Input from body

This is number 5

Formula Expression

regex('\d+', body)

Result

5

regex_simpleParameter
Example: Extracting a number from message body using regex.


Example 2 β€” Extract a value from message context

Suppose you have a message context value with the key id containing GMT.

Input

GMT

Formula Expression

regex('GMT|UTC', context('id'))

Result

GMT

RegEx Message Context
Example: Extracting a value from message context using regex.


Example 3 β€” Extract multiple values from nested context

Suppose you have multiple context keys, each with text values.

Input

GMT UTC
GMT CTO

Formula Expression

regex('UTC|CTO', context(regex('id.*')))

Result

UTC
CTO

RegEx Message Context Nested Function
Example: Extracting multiple values from nested context using regex.


Features

  • Extract single or multiple unique values from any Content using regular expressions
  • Works with message body, context, or results from other Formula functions
  • Combine with other Formula functions for powerful, layered expressions
  • Use in Log Views for filtering, grouping, and self-service diagnostics

Important

The regex plugin loads the entire message into RAM. Only use this function on small messages to avoid performance issues.


How to use the regex Formula

  1. Select Formula as the expression type plugin.
  2. Enter your regex expression in the 'Expression' text area.
  3. Provide a string as the Content parameter (for example, the message body, a context value, or another formula result).

Syntax

  • Extract from message body:
    regex('Expression', body)
  • Extract from message context:
    regex('Expression', context('MessageContextKey'))
  • Extract from another formula:
    regex('Expression', SomeOtherNestedFormulaFunction(Content))

Next Step

How to Add or manage Search Fields
How to Add or manage Log Views