Hi, I need to extract text from a field mixed text with number, for example ABC123456 I need ABC
The problem is that length of text varies from record to record. For example:
ABC123456 (ABC is needed)
ABBC554466 (ABBC is needed)
ABBBB457888 (ABBBB is needed)
I think I could use Regex to parse it and I read some posts. When I try .*, it is not working.
Please help. Thank you!
Solved! Go to Solution.
Why I still see "No Marked Groups Found"? Please help. Thank you!!!
You need to establish the marked group inside parentheses: ([A-Z]+)
your method works perfectly!!! Thank you very much!!!
I'm a big RegEx fan. I'm glad to see that this is working for you, but for the record I would like to propose an alternative solution for those that may not embrace regular expressions quite as quickly as you did.
ReplaceChar([Field1], "0123456789", '')
If you use the ReplaceChar function above, you can replace all numeric values with nothing. I would compare that with another regular expression formula of:
REGEX_Replace([Field1], "[^A-Z]", '')
That expression will take all non-A to Z characters and replace them with nothing.
Alteryx gives you so many options.
Cheers,
Mark
Can we get a customary speed comparison of RegEx vs ReplaceChar?
Part time Tableau, Part Time Alteryx. Full Time Awesome
Wow. This works great too. Thank you so much Lilo Bunny Foo Foo!
I'm so happy that you asked. The ReplaceChar() function is faster. I didn't want to brag about .2 seconds on 300,000 records, but since you asked.
Cheers,
Mark
@MarqueeCrew imo 0.2 seconds is a lifetime
And as I have mentioned before, I love you x
Part time Tableau, Part Time Alteryx. Full Time Awesome
User | Count |
---|---|
17 | |
15 | |
15 | |
8 | |
5 |