Learn R Programming

RVerbalExpressions (version 0.0.0.9000)

rx_line_break: Match a line break.

Description

This expression looks for line breaks, both Unix and Windows style by using the appropriate non printable characters.

Usage

rx_line_break(.data = NULL)

Arguments

.data

Expression to append, typically pulled from the pipe %>%

References

Unix style: https://codepoints.net/U+000A

Windows style: https://codepoints.net/U+000D

Non printable character: https://www.regular-expressions.info/nonprint.html

Examples

Run this code
# NOT RUN {
rx_line_break()

# create an expression
x <- rx_line_break()

# create input
string <- "foo\nbar"

# extract match
regmatches(string, regexpr(x, string))

# }

Run the code above in your browser using DataLab