public static Set < String > extractPlaceHolders ( String string ) { Matcher matcher = Pattern . compile ( PLACEHOLDER_PATTERN ) . matcher ( string ) ; Set < String > placeHolders = Sets . newHashSet ( ) ; while ( matcher . find ( ) ) { placeHolders . add ( matcher . group ( 1 ) ) ; } return placeHolders ; }
Extract all the placeholder s names of the string