Splitter.SplitTextByAnyDelimiter

This function returns a result of splitting a given piece of text into a list of smaller text chunks, based on user-specified delimiters.

Syntax

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

About

This function returns a result of splitting a given piece of text into a list of smaller text chunks, based on user-specified delimiters.

Explanation

Rephrase: Example 1 Divide the input using either commas or semicolons, without considering quotes and quoted delimiters, and starting from the beginning of the input. Usage: In Power Query M language, use the function Splitter.SplitTextByAnyDelimiter({",", ";"}, QuoteStyle.Csv)("a,b;""c,d;e"",f") Output: {"a", "b", "c,d;e", "f"} Example 2 Separate the input by commas or semicolons, while ignoring quotes and quoted delimiters, and starting from the end of the input. Usage: In Power Query M language, set the variable startAtEnd to true and use the function Splitter.SplitTextByAnyDelimiter({",", ";"}, QuoteStyle.Csv, startAtEnd)("a,""b;c,d") Output: {"a,b", "c", "d"}