private String replaceProps ( String pattern , String path , Properties properties ) { Matcher matcher = Pattern . compile ( pattern ) . matcher ( path ) ; String replaced = path ; while ( matcher . find ( ) ) { replaced = replaced . replace ( matcher . group ( 0 ) , properties . getProperty ( matcher . group ( 1 ) , "" ) ) ; } return replaced ; }
Replace properties in given path using pattern