scan_re {mclm} | R Documentation |
Scan a regular expression from console
Description
The functions scan_re()
and scan_re2()
can be used to scan a regular
expression from the console.
Usage
scan_re(perl = TRUE, ...)
scan_re2(perl = TRUE, ...)
Arguments
perl |
Logical. If |
... |
Additional arguments. |
Details
After the function call, R will continue scanning your input until it encounters an empty input line, i.e. until it encounters two consecutive newline symbols (or until it encounters a line with nothing but whitespace characters). In other words, press ENTER twice in a row if you want to stop inputting characters. The function will then return your input as a character vector of length one.
These functions are designed to allow you to input complex text, in particular
regular expressions, without dealing with the restrictions of string literals,
such as having to use \\
for \
.
Value
An object of class re
.