@@ -0,0 +1,970 @@
+package tk.mybatis.mapper.test.othres;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0A/**%0A * @author liuzh%0A * @since 2017/7/13.%0A */%0Apublic class TestDelimiter %7B%0A%0A    public static final Pattern DELIMITER = Pattern.compile(%22%5E%5B%60%5C%5C%5B%5C%22%5D?(.*?)%5B%60%5C%5C%5D%5C%22%5D?$%22);%0A%0A    @Test%0A    public void test()%7B%0A        Matcher matcher = DELIMITER.matcher(%22normal%22);%0A        if(matcher.find())%7B%0A            Assert.assertEquals(%22normal%22, matcher.group(1));%0A        %7D%0A%0A        matcher = DELIMITER.matcher(%22%60mysql%60%22);%0A        if(matcher.find())%7B%0A            Assert.assertEquals(%22mysql%22, matcher.group(1));%0A        %7D%0A%0A        matcher = DELIMITER.matcher(%22%5Bsqlserver%5D%22);%0A        if(matcher.find())%7B%0A            Assert.assertEquals(%22sqlserver%22, matcher.group(1));%0A        %7D%0A%0A        matcher = DELIMITER.matcher(%22%5C%22oracle%5C%22%22);%0A        if(matcher.find())%7B%0A            Assert.assertEquals(%22oracle%22, matcher.group(1));%0A        %7D%0A    %7D%0A%7D%0A

测试处理数据库分隔符。