str_after_nth: Text after the 'n'th occurrence of pattern.

str_after_nthR Documentation

Text after the nth occurrence of pattern.

Description

See strex::str_after_nth().

Usage

str_after_nth(string, pattern, n)

after_nth(string, pattern, n)

str_after_first(string, pattern)

after_first(string, pattern)

str_after_last(string, pattern)

after_last(string, pattern)

Arguments

string

A character vector.

pattern

The pattern to look for.

The default interpretation is a regular expression, as described in stringi::about_search_regex.

To match a without regular expression (i.e. as a human would), use coll(). For details see stringr::regex().

n

A vector of integerish values. Must be either length 1 or have length equal to the length of string. Negative indices count from the back: while n = 1 and n = 2 correspond to first and second, n = -1 and n = -2 correspond to last and second-last. n = 0 will return NA.


filesstrings documentation built on Feb. 16, 2023, 7:25 p.m.