Added functionality to handle delimiters of any length