mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fix regular expression
This commit is contained in:
parent
91adefb733
commit
b15faa9a35
1 changed files with 3 additions and 5 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue