Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. private static final Pattern OMIT_DIGITS = Pattern.compile("\\d+ (?<value>.+)");
  2. private final Collection<String> values = HistoricalFigures.get();
  3.  
  4. @Override
  5. protected void execute() {
  6.     Collection<String> valuesWithoutId = new ArrayList<>();
  7.  
  8.     for (String value: values) {
  9.         Matcher m = OMIT_DIGITS.matcher(value);
  10.  
  11.         if (!m.find()) {
  12.             continue;
  13.         }
  14.  
  15.         valuesWithoutId.add(m.group("value"));
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement