code: protected static Pattern[] commaDelimitedListToPatternArray(String commaDelimitedPatterns) {
          String[] patterns = commaDelimitedListToStringArray(commaDelimitedPatterns);
          List<Pattern> patternsList = new ArrayList<Pattern>();
          for (String pattern : patterns) {
              try {
                  patternsList.add(Pattern.compile(pattern));
              } catch (PatternSyntaxException e) {
                  throw new IllegalArgumentException("Illegal pattern syntax '" + pattern + "'", e);
              }
          }
          return patternsList.toArray(new Pattern[0]);
      }
docs: Convert a given comma delimited list of regular expressions into an array
  of compiled {@link Pattern}