I want to remove all the numbers in front of the string in Column B, but stopping at the first letter. Im currently using REGEX_Replace([field 1], '^\d+\s*', '') , but its not exactly what i want. Be in mind i have a large data set im working with, so below are just some examples of my data.
Column A | Column B
A | 47477474 g-500 bucket
N | 4744 g500
Y | 4744 Lamar Heart
T | 05' Penny Stock
What I want
Column A | Column B
A | g-500 bucket
N | g500
Y | Lamar Heart
T | Penny Stock
Solved! Go to Solution.
@fitch1892 To explain how my answer works
\w+
This will match with any word characters at the beginning of the text.
(.*)
This creates a group with all the other characters in the text.
I then replace the entire text with just what is in the group $1 (references the first group).
for more information on Regex check the Alteryx interactive videos found here: Interactive Lessons - Alteryx Community
Any questions or issues please ask :)
HTH!
Ira
Hi @fitch1892 ,
Find a test attached with Regex_Replace just as you begin.
Let me know if it works as you want.
More details about Replace using regex : https://community.alteryx.com/t5/Base-de-Connaissance-Francais/Maitrise-de-l-outil-Regex/ta-p/321434
Cheers,
I think - without trying it - you could also do something as simple as,
TrimLeft([Field1], "0123456789' ")
Very nice trick @PhilipMannering , I hadn't thought of that.🙂
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |