public static String interpolate(String text, String key, String value) { String pattern = "s/::" + key + "::/" + value + "/";
public static String interpolate(String text, Map vars) { HashSubstitution subst = new HashSubstitution(vars); Perl5Matcher matcher = new Perl5Matcher(); Perl5Compiler compiler = new Perl5Compiler(); StringBuffer result = new StringBuffer(); PatternMatcherInput input = new PatternMatcherInput(text);
    public static String interpolate(String text, String key, String value) {        String pattern = "s/::" + key + "::/" + value + "/";        return s_re.substitute(pattern, text);    }