There is a line:

uid = new_tracks_player84 & comment = file name & st = / design / images / audio30-856.txt & file = / vardata / modules / musicdb / samples / 201209 / d52d5cdf039d23b25f8af73e0b7b5504.mp3 & auto = play

As in Java using a regular expression, pull out:

/vardata/modules/musicdb/samples/201209/d52d5cdf039d23b25f8af73e0b7b5504.mp3 

those. value between file = and &

1 answer 1

If you do not parse the URL, but through regexp, then you can, for example:
Pattern.compile("file=(.*\\.mp3)&");
and pulling out 1 capturing group: matcher.group(1)

  • 2
    Thanks, it turned out! :) - Oleg Glazunov