public static String loadRegexpWithKey ( final String key ) { InputStream stream = null ; try { stream = WroUtil . class . getResourceAsStream ( "regexp.properties" ) ; final Properties props = new RegexpProperties ( ) . load ( stream ) ; return props . getProperty ( key ) ; } catch ( final IOException e ) { throw new WroRuntimeException ( "Could not load pattern with key: " + key + " from property file" , e ) ; } finally { closeQuietly ( stream ) ; } }
Load the regular expression stored in in regexp . properties resource file .