I want to modify paths with a certain pattern.
For example
./foo/1023023/43655345/bar/
becomes
./foo/_dir_/_dir_/bar/
The pattern is always preceded by /foo/ followed by 2 directories that have numbers as a name (the strings to replace with the tag dir).
I tried using sed, but my regex skills aren't up to par with this problem. I don't get how to replace both directory strings with the tag.