For example I have string en/something1/something2 and I need to modify something in each segment.
en/something1/something2
Solution obviously is explode string with delimiter "/", modify each element and implode back. But I am fairly sure there is shorter way to do it.