import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String[] args) {
final String regex = "(?![\\U00002619\\U00002661\\U00002665\\U00002763\\U00002764\\U00002765\\U00002766\\U00002767\\U00002E96\\U00002E97\\U00002F3C\\U0001F394\\U0001F48C\\U0001F48F\\U0001F491\\U0001F493\\U0001F494\\U0001F495\\U0001F496\\U0001F497\\U0001F498\\U0001F499\\U0001F49A\\U0001F49B\\U0001F49C\\U0001F49D\\U0001F49E\\U0001F49F\\U0001F4D6\\U0001F5A4\\U0001F60D\\U0001F618\\U0001F63B\\U0001F970\\U0001F9E1])[\\U00002600-\\U000027BF\\U0001f300-\\U0001f64F\\U0001f680-\\U0001f6FF]";
final String string = "";
final Pattern pattern = Pattern.compile(regex);
final Matcher matcher = pattern.matcher(string);
if (matcher.find()) {
System.out.println("Full match: " + matcher.group(0));
for (int i = 1; i <= matcher.groupCount(); i++) {
System.out.println("Group " + i + ": " + matcher.group(i));
}
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html