Text.AfterDelimiter

This function retrieves the text that appears after a designated delimiter. Users have the option to specify a numeric index to indicate which occurrence of the delimiter should be used. Additionally,...

Syntax

Text.AfterDelimiter(text as nullable text, delimiter as text, optional index as any) as any

About

This function retrieves the text that appears after a designated delimiter. Users have the option to specify a numeric index to indicate which occurrence of the delimiter should be used. Additionally, users can provide a list index to specify which occurrence of the delimiter should be considered, and whether the indexing should start from the beginning or end of the input.

Explanation

Extract the text following the hyphen in the sequence "111-222-333". Use the Power Query MText.AfterDelimiter function with the parameters ("111-222-333", "-") to retrieve the output "222-333" Extract the text following the second hyphen in the sequence "111-222-333". Utilize the Power Query MText.AfterDelimiter function with the parameters ("111-222-333", "-", 1) to generate the output "333" Retrieve the text following the second hyphen from the end in the sequence "111-222-333". Employ the Power Query MText.AfterDelimiter function with the parameters ("111-222-333", "-", {1, RelativePosition.FromEnd}) to produce the output "222-333"