RegEx search field expression type plugin
Easily extract unique values from messages using the Nodinite RegEx Search Field Expression Plugin. This page shows you how to configure, test, and use this plugin with clear input, configuration, and result examples.
✅ Extract single or multiple unique values from messages (payload)
✅ Use powerful RegEx expressions for advanced extraction
✅ Designed for high performance and self-service log views
What is the RegEx Plugin?
The Nodinite RegEx plugin lets you extract one or more unique values from the payload (Body) of Log Events. Use it to process messages where you need to target specific data using RegEx.
- Extract single or multiple unique values from messages (payload)
- Use RegEx expressions to match and style data
- Ideal for small payloads and business integration scenarios
Use this plugin for extracting values from messages using RegEx.
How It Works: Input → RegEx Expression → Result
Each example below clearly separates the Input (message body), the RegEx Expression (pattern), and the Result (output value).
Quick Example
Input:
<ns0:Orders xmlns:ns0="Common.Schemas/Nodinite/1.0">
<Order>
<Id>101</Id>
<Amount>1337</Amount>
<City CityId="054">Karlstad</City>
</Order>
<Order>
<Id>102</Id>
<Amount>10</Amount>
<City CityId="08">Stockholm</City>
</Order>
</ns0:Orders>
RegEx Expression:
CityId="([0-9]+)"
Result:
CityId="054"
CityId="08"
Examples
Example 1: Extract City IDs from XML Using RegEx
Input:
<ns0:Orders xmlns:ns0="Common.Schemas/Nodinite/1.0">
<Order>
<Id>101</Id>
<Amount>1337</Amount>
<City CityId="054">Karlstad</City>
</Order>
<Order>
<Id>102</Id>
<Amount>10</Amount>
<City CityId="08">Stockholm</City>
</Order>
</ns0:Orders>
RegEx Expression:
CityId="([0-9]+)"
Result:
CityId="054"
CityId="08"
Additional RegEx Examples
Type | Expression | Value(s) | Match | Comment |
---|---|---|---|---|
Alternative | dog|cat |
the cat loves the dog | cat and dog |
Use a | character to match at least one alternative |
Concatenation | h |
how |
h |
A sequence of sub expressions and matches results with the expression only |
Grouping | a(ero|ir)plane |
airplane and aeroplane are both English terms | airplane and aeroplane |
Use parentheses for a grouping match |
Iteration | go*gle |
gogle, google or gooooogle | ggle , gogle , google , gooogle |
Use a wildcard * character to match infinite combinations |
Length | ... |
longword | lon and gwo |
Use a dot, . to match any character. Repeat the number of dots to extract the matching number of characters from the string.NOTE: Using a dot is risky as it matches just about anything except line breaks, you should try other options |
Matching | [lsh]and |
land sand hand | land sand hand |
Use brackets to match on the specified characters |
Features
- Extract single or multiple unique values from messages (payload)
- Use RegEx expressions to match and style data
- Designed for small payloads and high performance
Note: This plugin loads the entire message into RAM. Only use it for small payloads.
How to Use
- Select the 'RegEx' expression type plugin when configuring a Search Field.
- Enter the RegEx expression to extract the desired value(s).
- Finalize the configuration and select the Message Types to apply the expression.
- Optionally, perform a re-index operation (Add or manage Search Field).
Extracted values are stored for as long as the Message Type retention is configured.
Test Expression
You can test your configuration in the 'Test Expression' tab when setting up a Search Field:
- Enter a sample payload in the 'Message Body' tab
- Select the 'RegEx' plugin
Here's an example selecting the 'RegEx' Search Field Expression Plugin. - Enter your RegEx expression (click on elements/attributes to get suggestions)
- Review the output and adjust as needed
If the expression is valid, you will see the unique values and total count:
Valid expression with state output, unique values, and total count.
If the expression is invalid or does not match any data, you will see:
Example of an invalid expression yielding no result.
Related Plugins and Topics
- RegEx with capturing groups
- RegEx on Message Context
- RegEx on Message Context with capturing groups
- XPath with RegEx
- Formula – For advanced options using nested expressions
Mermaid Diagram: Search Field Expression Flow
This diagram shows how the RegEx plugin fits into the overall search field expression process.
Next Step
Learn More
- What are Search Fields?
- What are Search Field Expressions?
- What are Message Types?
- What are Log Views?