public static Pattern createFilePattern ( String filePattern ) { filePattern = StringUtils . isNullOrBlank ( filePattern ) ? "\\*" : filePattern ; filePattern = filePattern . replaceAll ( "\\." , "\\." ) ; filePattern = filePattern . replaceAll ( "\\*" , ".*" ) ; return Pattern . compile ( "^" + filePattern + "$" ) ; }
Create file pattern pattern .