Formula - regexgroup
Easily extract values from messages using the Nodinite regexgroup
Formula plugin. This page shows you how to use regular expressions and group identifiers to retrieve data from message content, context values, or results from other formulas for your integrations.
✅ Extract single or multiple values using any valid regular expression group
✅ Use simple expressions to transform message content or context
✅ See clear, real-world examples with input, formula, and result
What does the regexgroup Formula do?
The regexgroup('Expression', groups, Content)
Formula function extracts values from text using any valid regular expression and group identifier. You can use this function on message bodies, context values, or results from other formulas.
Example 1: Extracting Groups from Message Body
Input from Body
ID=123,CUSTOMER=1
ID=456,CUSTOMER=2
Formula Expression
regexgroup('ID=(\d+)', '1', body)
Result
123
456
Example: Extracting group values from message body using regexgroup
Example 2: Extracting a Group from Message Context
Suppose you have a message context value with the key OrderRecord
containing order data.
Input
ORD|101|ExampleCompany1|456|Company Name ACME |Dieselgate valley 1|123 45|Flameburg|
Formula Expression
regexgroup('^(?:(.*?)\|){4}', 1, context('OrderRecord'))
Result
456
Example: Extracting a group value from message context using regexgroup
Features
- Extract single or multiple unique values from any Content using regular expression groups
- Supports match all, one, or selected groups
- Works with message body, context, or results from other Formula functions
- Ensures data integrity across integrated systems
Important
The regexgroup plugin loads the entire message into RAM. Only use this function on small messages to avoid performance issues.
How to use the regexgroup Formula
- Select Formula as the expression type plugin.
- Enter your regexgroup expression in the 'Expression' text area.
- Specify the group(s) to extract (e.g.,
1
or1,4-6
). - Provide a string as the Content parameter (e.g., message body, context value, or another formula result).
Syntax
- Extract from message body:
regexgroup('Expression', groups, body)
- Extract from message context:
regexgroup('Expression', groups, context('MessageContextKey'))
- Extract from another formula:
regexgroup('Expression', groups, SomeOtherNestedFormulaFunction(Content))
Next Step
How to Add or manage Search Fields
How to Add or manage Log Views
Related Topics
- Expression Type Plugins are used in Search Fields
- What are Search Fields?
- What are Search Field Expressions?
- What are Message Types?
- What are Log Views?