code: public static List<String> getStringsByRegex(final String text, final String regex) {
  
      Pattern pattern = Pattern.compile(regex);
      Matcher matcher = pattern.matcher(text);
      List<String> matchedStrings = new ArrayList<String>();
      while (matcher.find()) {
        matchedStrings.add(matcher.group(0));
      }
      return matchedStrings;
    }
docs: 根据正则表达式提取字符串
  
  @param text 源字符串
  @param regex 正则表达式
  @return 所以符合正则表达式的字符串的集合