class HerdStringHelper {

    public List<String> splitStringWithDefaultDelimiterEscaped(String inputString)
    {
        String delimiter = configurationHelper.getProperty(ConfigurationValue.FIELD_DATA_DELIMITER);
        String escapeChar = configurationHelper.getProperty(ConfigurationValue.FIELD_DATA_DELIMITER_ESCAPE_CHAR);
        List<String> splitString = new ArrayList<>();
        if (StringUtils.isNotBlank(inputString))
        {
            // Regex that is used to split, matches on delimiter but does not matches when delimiter is escaped by given escape character
            String regex = "(?<!" + Pattern.quote(escapeChar) + ")" + Pattern.quote(delimiter);

            for (String s : inputString.split(regex))
            {
                // Replace the delimiter when it is escaped with the delimiter value.
                splitString.add(s.replace(escapeChar + delimiter, delimiter));
            }
        }
        return splitString;
    }

}