Crow Canyon Software Forum

Forum Navigation
Please or Register to create posts and topics.

Regex to get a value

I know the $regextract([value/placeholder],@expression) function allows you to erase a string out of another string but what I'm hoping to do is use the same function, or another one, to pull the string that matches my expression out and put it in another column. I have a great pattern that pulls values out of an email body but I can't figure out how to put those values in column. Can you help?

Hi Michael,

Please refer attached document for saving extracted value in a column and let us know if there is any issue.

Uploaded files:

I've tried those steps. My starting text is

jim bob had a boat

My regex is bob  ($regextract([HTML|HTML],@bob))

My extracted text is

jim  had a boat

What I need, is to get bob in the extracted column.

Hi Michael,

Please use below regex to extract bob from string: jim bob had a boat
Regex: $regextract([Title|Title],@(bob))

RegExtract function extracts value of the first matching group. Reference for this: https://regexone.com/lesson/capturing_groups

My variable now has: $regextract([baseText|baseText],@(bob))

And this is what I get for a ##Value: jim bob had a boat

Please send us screenshot of your configurations. We have tried the above regex on our side and it is working fine.

 

Uploaded files:
  • regex1.png
  • regex2.png

Here's my config

Uploaded files:
  • regex1.png
  • regex2.png

Here's another bit of confusion for you. I use the exact same function ( $regextract([baseText|baseText],@(bob)) ) in a workflow it doesn't work. It gives me the whole baseText. If I do it in a Custom Action, it works perfectly. It gives me bob.

Hi Michael,

We have released new function in NITRO workflows. Please use below syntax.

Syntax:
$regextractgrp([value/placeholder],@expression,groupNumber,type(optional)) where type: HTMLDecode, HTMLStrip

Example:
$regextractgrp(Jim Bob has a test,@(Bob),1)