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.
Outputs
Choose a matching mode
Literal text
Regular expression
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.
Regex mode accepts a value from Regular Expression. Use a pattern when
the matching text varies, such as INV-\d+.Regex flags are preserved. A case-insensitive pattern can count different
letter cases without using the literal-mode Ignore Case option.
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.