I need to find a 4 digit number located in a string. The main characteristics are that the number will always be at the front of the string or be located between underscores. Is there a way to find this using only the formula tool?
AMG_GMBHG_1025_20191018_46305.pdf
AMG_WWHOL_1086_20191021_00168.pdf
AMG_SASFR_1031_20191021_16928.pdf
UU_1001_10222019_01433.pdf
1071_20191019_00465449.pdf
Solved! Go to Solution.
Hi @AlteryxUserFL ,
I was not able to think of an easy way of getting the 4 digit number using only a formula tool. But it is pretty easy to get it using the regex tool.
Let me know if that works for you.
Best,
Fernando Vizcaino
I'm on my iPhone now, but you might try this formula:
Regex_Replace([field],".*?\D*?(\d{4})\D*.*",'$1')
cheers,
mark