src/org/nutz/lang/util/NutMap.java
@Override
    public NutMap pickAndRemoveBy(Pattern p, boolean isNot) {
        // 一定不匹配
        if (null == p) {
            if (isNot) {
                NutMap re = this.duplicate();
                this.clear();
                return re;
            } else {
                return new NutMap();
            }
        }

        // 挑选
        NutMap re = new NutMap();
        List<String> delKeys = new ArrayList<String>(this.size());
        for (Map.Entry<String, Object> en : this.entrySet()) {
            String key = en.getKey();
            boolean matched = p.matcher(key).find();
            if (matched) {
                if (!isNot) {
                    delKeys.add(key);
                    re.put(key, en.getValue());
                }
            } else if (isNot) {
                delKeys.add(key);
                re.put(key, en.getValue());
            }
        }

        // 删除 Key
        for (String key : delKeys)
            this.remove(key);

        // 返回
        return re;
    }
@Override
    public NutMap pickAndRemoveBy(Pattern p, boolean isNot) {
        // 一定不匹配
        if (null == p) {
            if (isNot) {
                NutMap re = this.duplicate();
                this.clear();
                return re;
            } else {
                return new NutMap();
            }
        }

        // 挑选
        NutMap re = new NutMap();
        List<String> delKeys = new ArrayList<String>(this.size());
        for (Map.Entry<String, Object> en : this.entrySet()) {
            String key = en.getKey();
            boolean matched = p.matcher(key).find();
            if (matched) {
                if (!isNot) {
                    delKeys.add(key);
                    re.put(key, en.getValue());
                }
            } else if (isNot) {
                delKeys.add(key);
                re.put(key, en.getValue());
            }
        }

        // 删除 Key
        for (String key : delKeys)
            this.remove(key);

        // 返回
        return re;
    }
@ Override public NutMap pickAndRemoveBy ( Pattern p , boolean isNot ) { // 一定不匹配
 if ( null == p ) { if ( isNot ) { NutMap re = this . duplicate ( ) ; this . clear ( ) ; return re ; } else { return new NutMap ( ) ; } } // 挑选
 NutMap re = new NutMap ( ) ; List < String > delKeys = new ArrayList < String > ( this . size ( ) ) ; for ( Map . Entry < String , Object > en : this . entrySet ( ) ) { String key = en . getKey ( ) ; boolean matched = p . matcher ( key ) . find ( ) ; if ( matched ) { if ( ! isNot ) { delKeys . add ( key ) ; re . put ( key , en . getValue ( ) ) ; } } else if ( isNot ) { delKeys . add ( key ) ; re . put ( key , en . getValue ( ) ) ; } } // 删除 Key
 for ( String key : delKeys ) this . remove ( key ) ; // 返回
 return re ; }
从 Map 里挑选一些键生成一个新的 Map，自己同时删除这些键

@param p
匹配键的正则表达式，null 不会匹配任何一个键
@param isNot
true 表示被匹配上的会被忽略，false 表示被匹配上的才加入到返回的集合里
@return 新 Map
从 Map 里挑选一些键生成一个新的 Map，自己同时删除这些键