matchall

This block is part of the value group and was last modified in core v10.6.2.

matchall v10.6.2

In pins 5
  • text required
    value

    Text to search in.

  • expression required
    value

    The expression without flags.

  • global
    condition

    Collect every match. When off, only the first match is returned.

    Default true

  • insensitive
    condition

    Makes the whole expression case-insensitive.

    Default false

  • multline
    condition

    Beginnen/end anchors will match the start/end of a line.

    Default false

Out pins 2
  • success
    condition
  • matches
    array

Runs a JS-flavored regex (lookbehind and backreferences supported) against text; matches is an array where EACH element is itself an array: index 0 the full match, then one entry per capture group (unmatched groups become ""). success is true only when at least one match exists; an invalid pattern outputs success=false and an empty array without failing. global=false stops after the FIRST match; flags come from the insensitive/multline pins, not from the expression.

A typical wiring for matchall: value feeds the text pin; true feeds the global pin; convert to lowercase feeds the expression pin; the matches out pin feeds map; the success out pin feeds branch.

Studio canvas example for the matchall block: typical wiring for matchall.

Commonly used with

In production blueprints, this block is most often wired together with:

  • value: feeds into this block. Simply returns the provided value.
  • map: this block feeds into it. Creates a new array with the results of the provided function on every element in the array.
  • branch: this block feeds into it.
  • AND: this block feeds into it. operator for a set of boolean operands will be true if and only if all the operands are true.
  • true: feeds into this block. Gives the condition true hard-coded.
  • if: this block feeds into it. use mutations X or Y based on a condition.

Version history

Introduced in v10.6.2.


Back to value Return to the main group to view all sub-groups Back to regexp Return to the group to view all blocks within this group