@@ -0,0 +1,1496 @@
+/**%0A * Copyright (C) 2009 - 2010 by OpenGamma Inc.%0A *%0A * Please see distribution for license.%0A */%0Apackage com.opengamma.util;%0A%0Aimport java.util.StringTokenizer;%0Aimport java.util.regex.Pattern;%0A%0A/**%0A * Utility to simplify comparisons.%0A */%0Apublic final class RegexUtils %7B%0A%0A  /**%0A   * Restricted constructor.%0A   */%0A  private RegexUtils() %7B%0A  %7D%0A%0A  /**%0A   * Converts a simple wildcard style pattern to a regex pattern.%0A   * %3Cp%3E%0A   * The asterisk (%3Ccode%3E*%3C/code%3E) matches zero or more characters.%3Cbr /%3E%0A   * The question mark (%3Ccode%3E?%3C/code%3E) matches one character.%3Cbr /%3E%0A   * %3Cp%3E%0A   * The returned pattern will be setup to match a whole string using%0A   * %3Ccode%3E%5E%3C/code%3E and %3Ccode%3E$%3C/code%3E.%0A   * %0A   * @param text  the text to match, not null%0A   * @return the pattern, not null%0A   */%0A  public static Pattern wildcardsToPattern(final String text) %7B%0A    StringTokenizer tkn = new StringTokenizer(text, %22?*%22, true);%0A    StringBuilder buf = new StringBuilder(text.length() + 10);%0A    buf.append('%5E');%0A    boolean lastStar = false;%0A    while (tkn.hasMoreTokens()) %7B%0A      String str = tkn.nextToken();%0A      if (str.equals(%22?%22)) %7B%0A        buf.append('.');%0A        lastStar = false;%0A      %7D else if (str.equals(%22*%22)) %7B%0A        if (lastStar == false) %7B%0A          buf.append(%22.*%22);%0A        %7D%0A        lastStar = true;%0A      %7D else %7B%0A        buf.append(Pattern.quote(str));%0A        lastStar = false;%0A      %7D%0A    %7D%0A    buf.append('$');%0A    return Pattern.compile(buf.toString(), Pattern.CASE_INSENSITIVE);%0A  %7D%0A%0A%7D%0A

Complete implementation of config master