Dear all,
What I'm looking for is that, I have a column which contains the address, I want the name of the company only so which function should I used so that after the word (company) take the name till the , and remove the others. I hope it's clear what I want. To be more clear please find the file attached.
Also for example I want the output of this
address:Work,neigborhood:Alsahafa ,street:Olaya st ,company:Thigah business services ,floor:
To be this
Thigah business services
Any help in that please?
Solved! Go to Solution.
@Feras95p - there usually are multiple ways to achieve the same result in Alteryx. Attached solution is one of the many to help you get started.
Text-to-column tool I have used works the same way as Excel's Text-to-Column function.
Hope this helps.
Hi @Feras95p,
you can achieve this using the Regex Tool. ( I used a Data Cleansing Tool to remove leading/trailing whitespaces)
Output:
Workflow attached. Let me know if this is what you are looking for.
Best
Alex
Thank you ! it works great !
Could you please explain for me how this work .*company:(.*),.*
I'll do my best to explain it @Feras95p.
In less technical terms "look for the phrase <company:> take everything behind it until you see a comma"
In technical terms:
.* stands for "everything"
What this does in a Regex expression, it will go over everything until it hits "company:".
The () clips the part we want, in this case "everything" and it stops when we hit the "," character behind the (). It than ignores everything again.
So, If I have a sentence in the cell like this
(فراس اكسبريس (طبق رئيسي + سلطة) مدة أسبوع - 100 ريال (بعد الخصم
and I want only فراس اكسبريس
what will be the regex compression in this case ?
What does the structure look like before and after the word(s)?
If you just want the word and always exactly that word. You could go with:
.*(فراس اكسبريس).*
In other cases you would need do define what's before and what's after your searched term.
E.g.
.*markBeginning(my_word)markEnd.*
I have both like in the picture attached
شيفليفري اكسبريس
كلاسيك اكسبريس
not only one specific word to use this formula
.*(فراس اكسبريس).*
and when I tried this
.*markBeginning(my_word)markEnd.*
The bra cut () when I chose them to be my markbeginning doesn't work