Fix regular expression

This commit is contained in:
misaochan 2016-10-25 17:42:05 +13:00
parent 91adefb733
commit b15faa9a35

View file

@ -223,13 +223,11 @@ public class CategorizationFragment extends Fragment {
//Needs to be an ArrayList and not a List unless we want to modify a big portion of preexisting code
ArrayList<String> mergedItemsList = new ArrayList<String>(mergedItems);
//"(19|20)\\d{2}"
//"\\b(19|20)\\d{2}\\b"
//FIXME: Regex not working
for(Iterator<String> item = mergedItemsList.iterator(); item.hasNext();) {
String s = item.next();
if(s.matches("\\b\\d{4}\\b")) {
if(s.matches(".*\\d{4}.*")) {
Log.d(TAG, "Filtering out year " + s);
item.remove();
}