Sample use of SPLIT and JOIN custom plugins

Keyboard Maestro includes tokens which allow us to work with:

  • CSV formatted arrays,
  • and JSON formatted arrays.

Obtaining individual items in the array by a 1-based index, and retrieving the length of the array from index 0.

See:

Here is a simple example of using two custom plugins:

[SPLIT :: Custom plugin – Split a String to a KM Array](SPLIT :: Custom plugin – Split a String to a KM Array)

[JOIN :: Custom plugin – Join a KM Array with a delimite](JOIN :: Custom plugin – Join a KM Array with a delimiter)

Split can create CSV or JSON formatted KM arrays, using literal or regex delimiters,

and Join can create new strings by intercalating a supplied delimiter between the items of a KM Array.

Test for SPLIT and JOIN (2 Custom Plug-ins).kmmacros (22.2 KB)

-->

3 Likes

Ver 0.02

Custom SPLIT plugin updated to with multi-line input strings.

2021-02-07