Remove superfluous escape in two regexp

This commit is contained in:
jvoisin
2019-06-08 15:21:59 +02:00
parent e13877203b
commit 977b656bc6
@@ -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;
}
}