Hi all,
Im trying to find a good formula to extract a part of a string based on 2 conditions, wherever in the string they can be. This means that the element I need is not located in a specific position of the string (that's why I can't use Text to Columns), but it always contains the term "Store" at the beggining, followed by a number. That whole term (store + number) is contained between to " _ " symbols. Is there any formula in Alteryx that could do this, despite where in the string that would be?
Thank you!!
Solved! Go to Solution.
Hi @Patricia2,
you can achieve this using the RegEx Tool.
Example:
Input | Output |
random asdfjklasdjfkl _Store939393_random text | Store939393 |
Configuration:
what does the expression do?
.* = some random stuff
_()_ = this is the instresting part, it starts and ends with underlines
and we are looking for a text inside the underlines, that contains "Store" and \d+ aka a number.
Workflow attached. Let me know if this helped.
Regards
Alex
It worked! thank you