Crow Canyon Software Forum
Regex to get a value
Quote from mkirby on September 1, 2021, 1:04 pmI 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?
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?
Quote from supportTeam on September 7, 2021, 12:20 pmHi Michael,
Please refer attached document for saving extracted value in a column and let us know if there is any issue.
Hi Michael,
Please refer attached document for saving extracted value in a column and let us know if there is any issue.
Uploaded files:Quote from mkirby on September 7, 2021, 12:40 pmI'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.
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.
Quote from supportTeam on September 7, 2021, 2:48 pmHi 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
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
Quote from mkirby on September 7, 2021, 3:09 pmMy variable now has: $regextract([baseText|baseText],@(bob))
And this is what I get for a ##Value: jim bob had a boat
My variable now has: $regextract([baseText|baseText],@(bob))
And this is what I get for a ##Value: jim bob had a boat
Quote from supportTeam on September 7, 2021, 4:34 pmPlease send us screenshot of your configurations. We have tried the above regex on our side and it is working fine.
Please send us screenshot of your configurations. We have tried the above regex on our side and it is working fine.
Uploaded files:
Quote from mkirby on September 14, 2021, 5:13 pmHere'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.
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.
Quote from supportTeam on October 7, 2021, 6:59 amHi Michael,
We have released new function in NITRO workflows. Please use below syntax.
Syntax:
$regextractgrp([value/placeholder],@expression,groupNumber,type(optional)) where type: HTMLDecode, HTMLStripExample:
$regextractgrp(Jim Bob has a test,@(Bob),1)
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)