extract_match: Extract text matches

View source: R/text_tools.R

extract_matchR Documentation

Extract text matches

Description

Get texts in which certain "matches" occur.

Usage

extract_match(v, match, invert = FALSE, ignore.case = TRUE)

Arguments

v

Text vector or annotated data frame.

match

A regex match for a word(s) or expression. For multiple words, please use "|" to divide them.

invert

Do you want texts without certain matches to be returned? By default FALSE.

ignore.case

Should case be ignored? By default, TRUE.

Value

A list the same length as text variable.

Examples


extract_match(c("This function was created on the 29 September 2021",
"Today is October 12, 2021"), "October")


henriquesposito/poldis documentation built on Sept. 8, 2024, 5:38 a.m.