Hi all,
As some data cannot convert to some format, any syntax can solve the below situations? The main issue is to remove the most right side of symbol "-"
Source :
[1] K-U-BEM-248
[2] J-U-DCP-14730
[3] K-U-P-FSTP-GK-8500
[4] K-U-EFC2-2320
Output :
[1] 248
[2] 14730
[3] 8500
[4] 2320
Thanks a lot.
Solved! Go to Solution.
Hi @johnnyycchan ,
Would an alternative be to parse the digits and the digits with the square brackets and add them together?
@AngelosPachis solution is enough, though want to try a differnt formula. instead of add, I do the subtract
You can use Two RegEx tools OR one Formula tool to get the answer. Please try the attached workflow.
Best Regards
Arundhuti
Hi,
How about the below situation? The main issue is just to keep the character(s) / number(s) after most right side of symbol "-", other character(s)/number(s)/"-" should remove.
Source :
K-U-BEM-248
J-U-DCP-14730
K-U-P-FSTP-GK-8500
K-U-EFC2-2320
J-CS-VIP-AK-17038T
Output :
248
14730
8500
2320
17038T
Thanks a lot.
Best Regards,
Johnny
Hi Johnny ( @johnnyycchan )
As a side-note, another way to achieve your second request would be with a RegEx tool
Your captured group is whatever is in brackets, so you only want to keep everything (symbol for that is .* in Regex) that is after a dash (-). However, because you want to keep everything after the final dash of your string, you have to add .* at the front of your expression.
That .* is greedy, so it will automatically take you to the final instance of a dash.
Hopefully that makes sense although I'm conscious it probably wasn't the best of explanations.
Cheers,
Angelos
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |