code: private static Pattern[] createSplitPatterns(String pEscape, String pDel) {
          return new Pattern[] {
                  // Escape ($1: Everything before the delimiter, $2: Trailing escaped values (optional)
                  Pattern.compile("(.*?)" + // Any chars
                                  "(?:" +
                                     // The delimiter not preceded by an escape (but pairs of escape & value can be in
                                     // are allowed before nevertheless). A negative-look-before (?<!) is used for this
                                     // purpose
                                     "(?<!" + pEscape  + ")((?:" + pEscape + ".)*)" + pDel + "|" +
                                     "$" +    // or end-of-line
                                   ")",Pattern.DOTALL),
  
                  // Unescape, group must match unescaped value
                  Pattern.compile(pEscape + "(.)",Pattern.DOTALL)
          };
      }
docs: Create a split pattern for a given delimiter