I am a newbie to Designer and have a csv file in which I need to parse values located at the end of every string. Some values have decimals, some don't, and those that do can have varying numbers of decimal places. I am trying to use a regex and am getting close but no luck. I am trying to start at the end of the string, and parse the value at the space or quotation mark (as each line has this in common). Any formula suggestions?
Solved! Go to Solution.
Somethings like this should get you close:
Regex_Replace([field],"(.*\d)(.*)",'$1')
that will look for the last digit and then clobber everything else.
cheers,
mark
To extract the final number from your sample data you can use the following regex
.*?(\d*\.{0,1}\d*)$
resulting in
Dan
Thanks for your response Dan! Hope you have a happy New Year!
How could you modify this to keep a negative sign prior to the number?
Hi,
I got a similar issue whereby i need to extract the date out (example below, please note lenght of text varies but it will always ends with DD-MMM-YYYY).
Daily PL Adj 13-Oct-2020
Using below .*?(\d*\.{0,1}\d*)$, i managed to extract 2020 how i do extract 13-Oct-2020 out?
thanks
User | Count |
---|---|
18 | |
15 | |
13 | |
9 | |
8 |