Hi
@VJR,
Not sure if you’ve sorted this already, but if not hopefully this explains how to use it:
For the Extract Regex Values action you have the following inputs:
Target String (text) - this is the string you wish to perform the Regular Expression on.
Regex Pattern (text) - as the name suggests, the Regular Expression pattern to apply to the Target String.
Named Values (collection) - this is a collection containing 2 text fields called ‘Name’ and ‘Value’. Value should be left blank and the Name is what you want to call the result of your Regex.
So to put into a scenario, let’s say you have a string of text that consists of a product name and a 4 digit product code. You want to extract just th product code. It is always in different positions and sometimes other single digits can appear in the string so you’ve decided Regex will be the best way to get what you need. In this example your inputs are:
Target string - text data item with value:
“Product name Abc - 1234 Additional info”
(1234 being the product code we’re looking to extract)
Named Values - this is a collection with 2 text fields called ‘Name’ and ‘Value’. You will need as many rows as the number of outputs you want your Regular Expression to yield. For each row, ‘Value’ will be empty (this is where the result will be stored), and ‘Name’ is the identifier of our regex output.
In this case, we only want one output which is the product code, so we’ll add one row to the collection with: Name =
ProdCode and Value = empty.
Regex Pattern - you need to reference the named Value within your Regex. So in this example our text input for the Regex Pattern would be: “(?<
ProdCode>\d{4})”
The results are then returned from the action in the Named Values collection.
I.e. in this example the output would be the one row collection with:
Name = ProdCode
Value = 1234
Hopefully that makes sense, let me know if any questions.
Rich