private Pattern createPattern(String urlStr, String sepStr1, String sepStr2) {

        if (urlStr == null || "".equals(urlStr))
            return null;

        String[] urlArray = urlStr.split(",");
        StringBuffer buffer = new StringBuffer(urlStr.length() + urlArray.length * 2);
        buffer.append(sepStr1).append(urlArray[0]);
        for (int i = 1; i < urlArray.length; i++) {
            buffer.append(sepStr2).append(urlArray[i]);
        }

        Pattern pattern = Pattern.compile(buffer.toString());
        return pattern;
    }