rx_line_break: Match a line break.

Description Usage Arguments References Examples

View source: R/special_characters.R

Description

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

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
rx_line_break()

# create an expression
x <- rx_line_break()

# create input
string <- "foo\nbar"

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

RVerbalExpressions documentation built on Nov. 6, 2019, 5:08 p.m.