str_between: Select string between two strings

str_betweenR Documentation

Select string between two strings

Description

A stringr-like function to pull out a string between two string anchors [Experimental]

Usage

str_between(string, pattern1, pattern2)

Arguments

string

Input vector. Either a character vector, or something coercible to one.

pattern1

Pattern that will act as starting anchor in extraction, and be excluded. The default interpretation is a regular expression, as described in stringi::stringi-search-regex. Control options with regex().

pattern2

Pattern that will act as ending anchor in extraction, and be excluded.

Value

string or vector of strings

Examples

# str_between("apple", "ap", "e")

IntegralEnvision/integral documentation built on Nov. 4, 2024, 2 p.m.