Io farei così:

codice:
str = str.replaceAll ("\\\\(\\d{2}_\\d{4})\\\\(\\d{2}_\\d{4})\\.html", "/$1/$2.html");