Recently I change version of the JDK 8 instead 7 of my project and now I overwrite some code snippets using new features that came with Java 8.
final Matcher
What about Pattern.splitAsStream ?
Stream stream = Pattern.compile(regex).splitAsStream(input);
and then a collector to get a set.
Set set = stream.map(String::toLowerCase).collect(Collectors.toSet());