Remove superfluous escape in two regexp

master
jvoisin 6 years ago
parent e13877203b
commit 977b656bc6
  1. 4
      airsonic-main/src/main/java/org/airsonic/player/service/metadata/MetaDataParser.java

@ -159,11 +159,11 @@ public abstract class MetaDataParser {
title = title.trim();
// Don't remove numbers if true track number is missing, or if title does not start with it.
if (trackNumber == null || !title.matches("0?" + trackNumber + "[\\.\\- ].*")) {
if (trackNumber == null || !title.matches("0?" + trackNumber + "[. -].*")) {
return title;
}
String result = title.replaceFirst("^\\d{2}[\\.\\- ]+", "");
String result = title.replaceFirst("^\\d{2}[. -]+", "");
return result.length() == 0 ? title : result;
}
}
Loading…
Cancel
Save