patternDivision: Divide by a pattern

Description Usage Arguments Value Note Author(s) See Also Examples

Description

split a character vector by a regular expression

Usage

1
2
  txt %/~% rx
  

Arguments

txt

text to manipulate

rx

regular expression

Value

A character vector. For convenience, this function does not return a list as strsplit does.

Note

%/~% uses strsplit to split the strings. Logical arguments of strsplit can be indirectly modified using the operators.strsplit option declared as part of this package. For example, it uses perl regular expressions by default. See %but% for a description.

Author(s)

Romain Francois <francoisromain@free.fr>

See Also

grep, gsub

Examples

1
2
3
4
5
6
7
                        
  "Separate these  words by spaces" %/~% " +"
  
  ### From ?strsplit
  unlist(strsplit("a.b.c", "\\."))
  "a.b.c" %/~% "\\."
  

operators documentation built on May 2, 2019, 2:47 p.m.