Start integrating with ONEiO for free!
SIGN UP

Using the "Extract text with regular expression" formatting functionality in routing rules

Introduction

This article explains an example of how to use  "Extract text with regular expression" formatting functionality in the routing rules. 

In case you have questions related this configuration or any other setting related to your integrations, send a mail to support@oneio.cloud.

Overview

Like all the other formatters, this functionality can used to manipulate the values passed from source to target. It can be used to only take part of a message using a regular expression. The value of the first matching capture group is returned. This configuration can be added using the add button for the attributes or values on the left side under outbound, conversational and runtime mappings

 

Screenshot

Solution / Recommendations :

To avoid possible problems with backtracking regular expressions, we are using the RE2 engine which has some restrictions described HERE.

A good way to test the RegEx is reger101.com. Please choose GoLang as the format. Other regex tools/sites are regexr and the Olaf neumann's regex-generator. 

In a nutshell, the string to be used for test should come from the directly from the raw or formatted message section from the See Details pop up box, as seen in the screenshot below, to prevent any additional characters like spaces from being added. Take into account 'Line Feed' or 'Newline Character', etc if they are present in the string that is being passed on.

Screenshot


Do not copy the string from from the Received attribute in the message feed or from the See all pop up box as seen below in the screenshot.

Screenshot

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.