Learn R Programming

baizer (version 0.8.0)

reg_join: join the matched parts into string

Description

join the matched parts into string

Usage

reg_join(x, pattern, sep = "")

Value

character

Arguments

x

character

pattern

regex pattern

sep

separator

Examples

Run this code
reg_join(c("A_12.B", "C_3.23:2"), "[A-Za-z]+")

reg_join(c("A_12.B", "C_3.23:2"), "\\w+")

reg_join(c("A_12.B", "C_3.23:2"), "\\d+", sep = ",")

reg_join(c("A_12.B", "C_3.23:2"), "\\d", sep = ",")

Run the code above in your browser using DataLab