All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mg.common.metadata.freeMarker.Test Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.mg.common.metadata.freeMarker;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by liukefu on 2015/9/28.
 */
public class Test {

    public static void main(String[] args) {
        //.*?   (?<=).*(?=)
/*		Pattern p = Pattern.compile("(.*?)");
        StringBuffer sb = new StringBuffer();
		String str ="10分钟20分钟";
		Matcher m = p.matcher(str);
		while(m.find()) {
            System.out.println("group1:"+m.group(1));
            System.out.println("group2:"+m.group(2));
            System.out.println("start:" + m.start(2) + "----end:" + m.end(2));

            String group1 = "";
            m.appendReplacement(sb, group1 + "1111");

        }
        m.appendTail(sb);
        System.out.println(sb.toString());*/
        ExecutorService pool = Executors.newFixedThreadPool(10);

        int size = 569;
        int poolsize = 10;
        int threadSize = size / poolsize;
        for(int i=0;i© 2015 - 2024 Weber Informatics LLC | Privacy Policy