chr_count: Count matches from strings

Description Usage Arguments Value

Description

Count all pattern matches in character vector.

Usage

1
chr_count(x, pat, ignore.case = FALSE, invert = FALSE, ...)

Arguments

x

Character vector

pat

Pattern (regex) to extract from text.

ignore.case

Logical indicating whether to ignore capitalization. Defaults to false.

invert

Logical indicating whether to extract matching portion (default) or, if this value is true, non-matching portions of text.

...

Other named arguments passed to gregexpr.

Value

Vector of matches extracted from input text.


mkearney/chr documentation built on May 19, 2019, 3:03 a.m.