Any advise on how to achive this? Thanks ahead for your help.
Code
A.5.1
A.5.1.1
A.5.1.2
A.6.1
A.6.1.1
A.10.1.2
A.11.1.3
A.11.1.4
A.14.1.5
A.20.2
Expected outcome:
Code
A.5
A.5
A.5
A.6
A.6
A.10
A.11
A.11
A.14
A.20
Solved! Go to Solution.
Hi @Davidmg1982D I mocked up some regex which can solve this challenge. The Regex will look for a word character then a period followed by one or more digit in a string in a marked group in a string followed by another period and a digit. This marked group is what will be replaced in the column e.g. what is outputted.
Hey @Davidmg1982D,
Here is one way to do this with Regex
The regex code:
([^\.]+\.[^\.]+)
This regex looks for everything before the second dot.
If you want to learn more about Regex the community has some really quick interactive videos on getting to grips with it here https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20...
Any questions or issues please ask
Ira Watt
Technical Consultant
Watt@Bulien.com
Hi @Davidmg1982D ,
Find attached the way to do this.
One useful link to learn more about regex : https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Parsing%20...
You can also achieve this solution by using formula tool. Just an another workaround instead of using regex tool. Thanks!!
I knew regex will be the answer, thanks for sharing a source of knowledge.
Thanks Emmanuel, much appreciated.