春华秋衣
@Inszt:
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Pattern p = Pattern.compile("\\d+(,\\d+)*");
Matcher m = p.matcher("\"1111,2222,3333,44444,55555\"------------------\"1111,2222,3333,44444,55555\"------------------\"1111,2222,3333,44444,55555\"------------------");
while(m.find()){
System.out.println(m.group());
}
/**
* output:
* 1111,2222,3333,44444,55555
* 1111,2222,3333,44444,55555
* 1111,2222,3333,44444,55555
*/
}
}
Regex
这样的?