How to keep just the numbers in a certain string?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi there,
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.
Susana
Solved! Go to Solution.
- Labels:
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks a lot! It works perfectly :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
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.
Many thanks,
Casper
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
RegEx tool in parse mode with
(\d.%)
Hmmm... Did you change your question?
https://www.linkedin.com/in/adriley/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Adam,
I did, but if that also results in the percentage value including decimals that is fine.
Thanks a lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Adam,
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,
Casper
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks. It works for me.
