src/org/nutz/lang/Files.java
public static ZipEntry[] findEntryInZip(ZipFile zip, String regex) {
        List<ZipEntry> list = new LinkedList<ZipEntry>();
        Enumeration<? extends ZipEntry> en = zip.entries();
        while (en.hasMoreElements()) {
            ZipEntry ze = en.nextElement();
            if (null == regex || Regex.match(regex, ze.getName()))
                list.add(ze);
        }
        return list.toArray(new ZipEntry[list.size()]);
    }
public static ZipEntry[] findEntryInZip(ZipFile zip, String regex) {
        List<ZipEntry> list = new LinkedList<ZipEntry>();
        Enumeration<? extends ZipEntry> en = zip.entries();
        while (en.hasMoreElements()) {
            ZipEntry ze = en.nextElement();
            if (null == regex || Regex.match(regex, ze.getName()))
                list.add(ze);
        }
        return list.toArray(new ZipEntry[list.size()]);
    }
public static ZipEntry [ ] findEntryInZip ( ZipFile zip , String regex ) { List < ZipEntry > list = new LinkedList < ZipEntry > ( ) ; Enumeration < ? extends ZipEntry > en = zip . entries ( ) ; while ( en . hasMoreElements ( ) ) { ZipEntry ze = en . nextElement ( ) ; if ( null == regex || Regex . match ( regex , ze . getName ( ) ) ) list . add ( ze ) ; } return list . toArray ( new ZipEntry [ list . size ( ) ] ) ; }
根据正则式，从压缩文件中获取文件

@param zip
压缩文件
@param regex
正则式，用来匹配文件名
@return 数组
根据正则式，从压缩文件中获取文件