Hi - I am working to try and gather a dollar amount figure from a text string within a workflow. I have included a sample of 5 rows of text to illustrate the format of text string (see below). TRANSFER is always present, and the "(" indicates a negative number.
What I am trying to achieve is having a new column with just the dollar amounts (see Output column below).
Any suggestions on modules and instructions would be greatly appreciated.
Solved! Go to Solution.
@scott_fuller One way of doing this
Wow - thanks for such a quick reply. Does the logic work regardless of length of the dollar amount? I ask because the amount can be as little as a few million dollars to multiple billions of dollars.
When trying the solution above the new column of data was all [null]. I don't really understand what the expression is actually doing, so hard to edit to make it work.
@scott_fuller
I noticed that there is also decimal point and also space between "(" and "$", so maybe we can try as this based on flow @binuacs
Thanks - So there is not always a "(" in the field. Perhaps there is a way to gather the data between key words.
The first word in each field is "TRANSFER" and then the bit of information I am after followed by the word "FROM". Is there a way to extract anything between those 2 words as a separate column?
Field example:
TRANSFER ( $567,098,519.03) FROM A to B
TRANSFER $567,098.03 FROM F to G
TRANSFER ( $23,567,098,519.03) FROM A to Y
TRANSFER $567,098,519.03 FROM 5 to 8
Adds a new column with:
( $567,098,519.03)
$567,098.03
( $23,567,098,519.03)
$567,098,519.03
@scott_fuller
Thank you for the additional information.
I just tried with my flow, it seems to work as it is
Keywork I am using is the sign "$" and end of digit.
This works great - thank you so much!!
In the spirit of "teaching a man to fish" can you explain what the individual pieces of the regex expression do? Or is that asking too much?
@scott_fuller
Of course not, thank you for asking actually.
I am always using this website for RegEx, and it gives good explaination how the RegEx works.
https://regex101.com/
As you can see the righthand side of the sanpshot below.