I have a path C:\1\2\3\4\ but I want to get C:\1\2\3\
Also, how can I get just 2 or 3 alone separately based on pattern.
Again 1, 2, 3 are just examples, want to use a formula tool to get the above. Could someone help me with this? and also explain to me how it works? I would love to understand the logic behind regex_replace.
Solved! Go to Solution.
Hi @shravanvijayaprasad try this.
You can do it by parsing the regex depending upon the combinations of word your are using so change the regex accordingly or you can do this using text tol columns tool as well just need to concatinate the fields again.
Thanks
@grazitti_sapna thank you so much, the only issue is I can't be sure the path will be like C:\1\2\3\4\ or it could also be C;\1\2\3\4\5\ or C:\1\2\3\4\5\6\ . In these cases, I want it to be dynamic and give the output as C:\1\2\3\ , C;\1\2\3\4\ and C:\1\2\3\4\5\ respectively. Infact, the path could be something like D:\1\2\3\4\ also.
@grazitti_sapna thank you so much! this did work! I also did it using regex_replace in formula tool, just attaching if anyone wants to use it in the future 🙂