Skip to main content
The Count Occurrences action counts how many times a literal string or regular-expression separator appears in text. Switch Use Regex to choose the matching mode.

Inputs

Outputs

Choose a matching mode

Literal mode searches for the exact characters in Search Text. Turn on Ignore Case to compare lowercase versions of the text and search value.With Text set to Error: error: ERROR and Search Text set to error, the count is 1 by default or 3 when case is ignored.
Avoid capture groups in the regex used for this action. The implementation counts the pieces produced by splitting the text, and captured values are included in that result. Use non-capturing groups such as (?:foo|bar) when grouping is required.
The action counts non-overlapping occurrences. For example, searching for aa in aaa returns 1.