question: private static String wildcardToRegex ( String pattern ) { return "^" + StringUtils . replaceEach ( escapeRegexp ( pattern ) , new String [ ] { "\\*" , "\\?" } , new String [ ] { ".*" , "." } ) + "$" ; }
target:  Converts wildcard to regular expression