I am trying to replace a segment of a path in a string with another string. I have a feeling that RegEx would be the best way to do this but don't know how. I would like to replace xxxxx with another string:
resources/audio/xxxxx/someaudio.mp3
The root path of "resources/audio/" will always remain the same, but I am trying to replace the parent folder of the audio file. The audio file is arbitrary and can change. Can someone please help?