Hi,
I have some data like the following:
Abcd Efgh 1111
Abcd - Lmno
What I would like to get is just Abcd Efgh from the first row (get rid of all following numbers), and
keep Abcd - Lmno
is regex the best way to do this? I tried a formula, but unfortunately, got all False
thanks.
Solved! Go to Solution.
Hi @hamzam
I would probably go a RegEx route with this one, although you could also use the Data Cleansing tool to remove all numbers.
Regex Replace will help you replace the numbers with nothing. If in a formula, you can use: Regex_Replace([Field],"(.*?)(\d*.*)","$1"). This marks everything before a number, and then after a number as distinct groups and replaces with just what's before the number.
Let me know if that helps. Cheers!
Esther
@mceleavey 's solution is also elegant. You could use the Replace method in the RegEx tool as well. My method uses a formula tool.
I'd go parse if the numbers are important to keep, and Replace if you want to drop them.
Cheers,
Esther
thank you both @mceleavey and @estherb47
You're very welcome, @hamzam
You're welcome!!!