ez.regexp: find with regular expression (case sensitive)

ez.regexpR Documentation

find with regular expression (case sensitive)

Description

find with regular expression (case sensitive)

Usage

ez.regexp(s, pat, ignorecase = FALSE, once = FALSE, split = FALSE)

Arguments

s

string

pat

regular expression pattern

once

match once or many times

split

split or not (see below)

Value

returns a list ($start, $end, $match, $split)
$start and $end as numeric vectors indicating the start and end positions of the matches.
$match contains each exact match
$split contains the character vector of splitted strings (split by the matched pattern, ie, the rest that do not match).
If no match is found and split=FALSE, all components will be NULL
If no match is found and split=TRUE, all components will be NULL except that split will contain the whole string


jerryzhujian9/ezmisc documentation built on March 9, 2024, 12:44 a.m.