Hello, i have an automation problem
so I have a several product name which I want the robot to remove the last word in the product name (after space)
Reinforced Steel Bar
i want to delete the last word (“bar”) so it will become “Reinforced Steel”
i want to delete the last word ("(new)") so it will become “Mirror”
So how can i achieve this?
Thank you in advance
Can you try the following expression?
Hi @Fauzan_Marantama ,
Besides @Yoichi’s regex solution, another possible way to solve the issue would be:
stringVariable.Replace(" "&stringVariable.Split(" "c).Last,"")
This is the correct solution. So many people try to overcomplicate things with Regex and complicated expressions. Simple works.