import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
class Exemplo
{
public static void main
(String[] args
) {
final Pattern regex = Pattern.compile("Copia - Copia\\.[^.]+$");
List<String> files = new ArrayList<String>();
files.add("File 123 - Copia.txt");
files.add("File 10 - Copia - Copia.java");
files.add("File 12 - Copia.java");
files.add("File 14 - Copia - Copia.txt");
files.add("File 16 - Copia.txt");
files.add("File 18 - Copia - Copia.log");
files.add("File 2 - Copia.txt");
files.add("File 4 - Copia.log");
files.add("File 6 - Copia - Copia.txt");
files.add("File 8 - Copia.txt");
{
if (regex.matcher(file).find())
{
System.
out.
println("Encontrado: " + file
); }
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwuQXJyYXlMaXN0OwppbXBvcnQgamF2YS51dGlsLkxpc3Q7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguUGF0dGVybjsKaW1wb3J0IGphdmEudXRpbC5yZWdleC5NYXRjaGVyOwoKY2xhc3MgRXhlbXBsbwp7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKQogICAgewogICAgICAgIGZpbmFsIFBhdHRlcm4gcmVnZXggPSBQYXR0ZXJuLmNvbXBpbGUoIkNvcGlhIC0gQ29waWFcXC5bXi5dKyQiKTsKCiAgICAgICAgTGlzdDxTdHJpbmc+IGZpbGVzID0gbmV3IEFycmF5TGlzdDxTdHJpbmc+KCk7CgogICAgICAgIGZpbGVzLmFkZCgiRmlsZSAxMjMgLSBDb3BpYS50eHQiKTsKICAgICAgICBmaWxlcy5hZGQoIkZpbGUgMTAgLSBDb3BpYSAtIENvcGlhLmphdmEiKTsKICAgICAgICBmaWxlcy5hZGQoIkZpbGUgMTIgLSBDb3BpYS5qYXZhIik7CiAgICAgICAgZmlsZXMuYWRk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