Hello,
I've a use case where in i wanted to extract digits from the below sample text. Can someone help me to resolve this?
"CDH Investments Join $14.5M Round In Chinese Online Education Firm Longzhimen"
Thanks,
I would suggest regexp, unless text around the number is static - then just replace ""CDH Investments Join $"" and ""M Round In Chinese Online Education Firm Longzhimen"" with """" and you have your digits.
CDH Investments Join $14.5M Round In Chinese Online Education Firm Longzhimen --> Store this in data Item. Now use the calculation stage and use Length function store it in data item now take 2nd calculation stage and find the position of ""$"" using Instr function and store in data item again use calculation stage use Instr function and expression should be ""Total Length of string"", Total Length of string - Postion length.
I hope this will help.
Simple one is: ""[\d\.]+"" (that will match something like 127.0.0.1 too if it happens to be in input), ""\d+(\.\d+)?"" is better to match float.
Seems like you don't care about M suffix...
If your search this community for 'regex' threads, you'll find a lot of examples and instructions on how to accomplish that. There's also this site to help you further with regex.
------------------------------ Happy coding! Paul Sweden ------------------------------
Happy coding! Paul, Sweden (By all means, do not mark this as the best answer!)