code: protected Pattern toRegexp(String filespec) {
  		Matcher m = escaper.matcher(filespec);
  		StringBuffer sb = new StringBuffer();
  		while (m.find()) {
  			String matched = m.group(0);
  			if (matched.equals("*")) {  //$NON-NLS-1$
  				m.appendReplacement(sb, "\\[^/]*?"); //$NON-NLS-1$
  			} else if (matched.equals("?")) {  //$NON-NLS-1$
  				m.appendReplacement(sb, "[^/]"); //$NON-NLS-1$
  			} else if (matched.equals("$")) { //$NON-NLS-1$
  				m.appendReplacement(sb, "\\\\\\$"); //$NON-NLS-1$
  			} else if (matched.equals("\\")) { //$NON-NLS-1$
  				m.appendReplacement(sb, "\\\\\\\\"); //$NON-NLS-1$
  			} else {
  				m.appendReplacement(sb, "\\\\" + matched); //$NON-NLS-1$
  			}
  		}
  		m.appendTail(sb);
  		String patStr = sb.toString();
  		return Pattern.compile((patStr.startsWith("/") ? BLANK : "(^|/)") + //$NON-NLS-1$ //$NON-NLS-2$
  				patStr + "$", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
  	}
docs: Returns a regular expression for a filepath that can include standard
  file system wildcard characters (e.g. * and ?)
  
  @param filespec A filespec that can contain wildcards
  @return A regular expression to match paths specified by <code>filespec</code>