countmatch: Count pattern matches per string

View source: R/primitives.R

countmatchR Documentation

Count pattern matches per string

Description

Count pattern matches per string

Usage

countmatch(x, pattern, fixed = FALSE)

Arguments

x

An atomic vector.

pattern

A regular expression (or fixed string when fixed = TRUE).

fixed

Use fixed (non-regex) matching instead of regular expressions.

Value

An integer vector.


basetable documentation built on Sept. 18, 2026, 9:13 a.m.