java 贪婪匹配_Java:正则匹配的不同情况(贪婪,勉强): greedy, reluctant, possesive
importjava.util.regex.Matcher;importjava.util.regex.Pattern;publicclassTest{publicstaticvoidmain(String[]args){Stringstr="cpattern=Pattern.compile("");matcher=pattern.matcher(str);while(matcher.find()