github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/lists/jsplit_doc.yaml (about)

     1  - DocumentID: jsplit
     2    Title: >-
     3      `jsplit` 
     4    CategoryID: commands
     5    Summary: >-
     6      Splits STDIN into a JSON array based on a regex parameter
     7    Description: |-
     8      `jsplit` will read from STDIN and split it based on a regex parameter. It outputs a JSON array.
     9    Usage: |-
    10      ```
    11      <STDIN> -> jsplit regex -> <stdout>
    12      ```
    13    Examples: |-
    14      ```
    15      ยป (hello, world) -> jsplit l+ 
    16      [
    17          "he",
    18          "o, wor",
    19          "d"
    20      ]
    21      ```
    22    Detail: |-
    23      `jsplit` will trim trailing carriage returns and line feeds from each element
    24      as well as any trailing empty elements (zero length strings) in the JSON array.
    25      However any empty elements will be retained and any other whitespace characters
    26      - or carriage returns and/or line feeds in the middle of an element - will be
    27      retained.
    28  
    29      This is so that the formatting of (multiline) text is retained as much as
    30      possible to ensure the `jsplit` is accurate while at the same time any commonly
    31      unwanted "noise" is stripped from the output.
    32      
    33    Synonyms:
    34    - jsplit
    35    - list.split
    36    Related:
    37    - prepend
    38    - append
    39    - map
    40    - a
    41    - ja
    42    - 2darray
    43    - count
    44    - item-index
    45    - element
    46    - range
    47    - mtac
    48    - msort