strsplit_capture: Split a string, keeping separator regions

View source: R/string_interpolation.R

strsplit_captureR Documentation

Split a string, keeping separator regions

Description

Split a string, keeping separator regions

Usage

strsplit_capture(
  x,
  split,
  ...,
  ignore.case = FALSE,
  fixed = FALSE,
  perl = FALSE,
  useBytes = FALSE
)

Arguments

x

character string to split (length 1 vector)

split

split pattern

...

force later arguments to bind by name

ignore.case

passed to gregexpr

fixed

passed to gregexpr

perl

passed to gregexpr

useBytes

passed to gregexpr

Value

list of string segments annotated with is_sep.

See Also

sinterp, si

Examples


strsplit_capture("x is .(x) and x+1 is .(x+1)", "\\.\\([^()]+\\)")


wrapr documentation built on Aug. 20, 2023, 1:08 a.m.