Hi. Typicaly, I have some trouble with regex. I h...
# random
p
Hi. Typicaly, I have some trouble with regex. I have some path: /folder/test/test1.csv I need: /folder/data/test/test1.csv (generaly, I must add data after second /) Can you help me?
t
Don’t use a regex 😄
p
I don't see another way in this case ;(
s
if the interpolation you’re doing closely resembles the example you’ve given, then you could do this with a relatively simple match group replace, buuut I think this could be a relatively simple string manipulation case if the paths are normal enough
👨‍🎓 1
t
do a split, then join
👍 1
👆 1
h
p
@hho there is the reason why we love Kotlin 😉
k
You really shouldn't use string manipulation on paths, there are real apis for that.