@@ -0,0 +1,500 @@
+package reg;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0Apublic class Reg %7B%0A%09public static List%3CString%3E matches(String reg_str, CharSequence str)%7B%0A%09%09List%3CString%3E matchList = new ArrayList%3CString%3E();%0A%09%09Pattern pattern = Pattern.compile(reg_str);%0A%09%09Matcher matcher = pattern.matcher(str);%0A%09%09%0A%09%09int index = 0;%0A%09%09while(matcher.find(index))%7B%0A%09%09%09matchList.add(matcher.group());%0A%09%09%09index = matcher.end();%0A%09%09%7D%0A%09%09return matchList;%0A%09%7D%0A%7D%0A

Create Reg.java