Splitter.SplitTextByAnyDelimiter

Syntax

Splitter.SplitTextByAnyDelimiter(delimiters as list, optional quoteStyle as nullable number, optional startAtEnd as nullable logical) as function

About

Returns a function that splits text into a list of text at any of the specified delimiters.

Example 1

Split the input by comma or semicolon, ignoring quotes and quoted delimiters and starting from the beginning of the input.

Usage

Splitter.SplitTextByAnyDelimiter({",", ";"}, QuoteStyle.Csv)("a,b;""c,d;e"",f")

Output

{"a", "b", "c,d;e", "f"}

Example 2

Split the input by comma or semicolon, ignoring quotes and quoted delimiters and starting from the end of the input.

Usage

let
    startAtEnd = true
in
    Splitter.SplitTextByAnyDelimiter({",", ";"}, QuoteStyle.Csv, startAtEnd)("a,""b;c,d")

Output

{"a,b", "c", "d"}