This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
How can I just keep the numbers ina certain string, for example:
address = "Maistraße 37" or address = "64 Redemarsh"
On the first example I want to get 37 and the on the second 64, is this possible using the trim function? if yes, how? or is there any other way?
Thanks in advance.
Go to Solution.
Go to Solution.
REGEX_Replace([Address], "[\D]", "")
It uses regex to replace anything that is not a digit with a blank string.
Thanks a lot! It works perfectly 🙂
How would this work if you also want to keep decimals . For example, "Bonus 3,5%" => 3.5. Using this formula above I will get 35.
RegEx tool in parse mode with
Hmmm... Did you change your question?
I did, but if that also results in the percentage value including decimals that is fine.
Thanks a lot!
Maybe it has to do with the fact that the field is 'Wstring'. I cannot just simply convert it to V_String; this renders a lot of errors.
This formula helped me in getting only the digits:
REGEX_Replace([Description], "[\D]", "")
However, this changes 9,1% into 91.
Is there a way to take this into account?
If it is easier to use parse (\d.%), please let me know how I can set this up properly, as it returns only null values at the moment.
Many thanks again,
Please use the Regex Tool instead of writing regex in the formula tool.
[/d.%]|[/d.d%] or condition will help pick multiple scenarios as well.
Hope this is helpful