@@ -0,0 +1,619 @@
+package ru.revdaalex.regex;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0A/**%0A * Created by revdaalex on 31.05.2016.%0A */%0Apublic class SimpleGenerator implements Template %7B%0A    public String generate(String template, Map data) %7B%0A        Pattern p = Pattern.compile(%22%5C%5C$%5C%5C%7B(%5B%5E%7D%5D+)%5C%5C%7D%22);%0A        Matcher m = p.matcher(template);%0A        StringBuffer sb = new StringBuffer();%0A        while (m.find())%0A        %7B%0A            m.appendReplacement(sb, data.get(m.group(1)).toString());%0A        %7D%0A        m.appendTail(sb);%0A        return sb.toString();%0A    %7D%0A%7D%0A

add SimpleGenerator.java