Search code examples
powerquerym

What is the difference between Text.Split and Text.SplitAny?


The difference between Text.Split and Text.SplitAny is not clear to me. They both seem to use the same syntax and do the same thing. Would someone please explain the difference(s) between them to me?


Solution

  • Text.Split splits a text at the supplied delimiter (which can contain multiple characters), while Text.SplitAny splits the text at each individual character in the supplied Delimiter.

    E.g. Text.Split("MarcelBeug","ce") returns

    Mar

    lBeug

    While Text.SplitAny("MarcelBeug","ce") returns

    Mar

    lB

    ug