Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

char_class

A range or char_class of characters


Description

Group characters together in a class to match any of them (char_class) or none of them (negated_char_class).

Usage

char_class(...)

negated_char_class(...)

negate_and_group(...)

Arguments

...

Character vectors.

Value

A character vector representing part or all of a regular expression.

References

Examples

char_class(LOWER, "._")
negated_char_class(LOWER, "._")

# Usage
x <- (1:10) ^ 2
(rx_odd <- char_class(1, 3, 5, 7, 9))
(rx_not_odd <- negated_char_class(1, 3, 5, 7, 9))
stringi::stri_detect_regex(x, rx_odd)
stringi::stri_detect_regex(x, rx_not_odd)

rebus.base

Core Functionality for the 'rebus' Package

v0.0-3
Unlimited
Authors
Richard Cotton [aut, cre]
Initial release
2017-04-25

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.