mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Switch to checking for 19/20 years only
This commit is contained in:
parent
5a825b0c1e
commit
a058adcc42
1 changed files with 2 additions and 1 deletions
|
|
@ -226,8 +226,9 @@ public class CategorizationFragment extends Fragment {
|
|||
for(Iterator<String> item = mergedItemsList.iterator(); item.hasNext();) {
|
||||
String s = item.next();
|
||||
|
||||
//\b(19|20)\d{2}\b
|
||||
//Check if s contains a 4-digit word anywhere within the string (.* is wildcard)
|
||||
if(s.matches(".*\\d{4}.*")) {
|
||||
if(s.matches(".*(19|20)\\d{2}.*")) {
|
||||
Log.d(TAG, "Filtering out year " + s);
|
||||
item.remove();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue