strmatch: Extract matched group(s) from a string.

Description Usage Arguments Value Examples

Description

Extract matched group(s) from a string.

Usage

1
2
strmatch(pattern, str, capture = TRUE, perl = TRUE, global = TRUE,
  ignore.case = FALSE)

Arguments

pattern

character string containing a regular expression

str

character vector where matches are sought

capture

if TRUE capture groups are returned in addition to the complete match

perl

if TRUE perl-compatible regexps are used.

global

if TRUE gregexpr is used for matching otherwise regexpr.

ignore.case

case sensitive matching

Value

a list containing a match and a capture component

Examples

1
##

gschofl/gsmisc documentation built on May 17, 2019, 8:52 a.m.