% Generated by roxygen2: do not edit by hand % Please edit documentation in R/run_regex.R \name{view_regex} \alias{view_regex} \title{View grouped regex results} \usage{ view_regex(text, pattern, ..., render = TRUE, escape = render, exact = escape, result_only = FALSE) } \arguments{ \item{text}{Text to search} \item{pattern}{Regex pattern to look for} \item{...}{Arguments passed on to \code{base::regexec} \describe{ \item{ignore.case}{if \code{FALSE}, the pattern matching is \emph{case sensitive} and if \code{TRUE}, case is ignored during matching.} \item{perl}{logical. Should Perl-compatible regexps be used?} \item{fixed}{logical. If \code{TRUE}, \code{pattern} is a string to be matched as is. Overrides all conflicting arguments.} \item{useBytes}{logical. If \code{TRUE} the matching is done byte-by-byte rather than character-by-character. See \sQuote{Details}.} }} \item{render}{Render results to an HTML doc and open in RStudio viewer?} \item{escape}{Escape HTML-related characters in \code{text}?} \item{exact}{Should the regex pattern be displayed as entered by the user into R console or source (default)? When \code{TRUE}, regex is displayed with the double \code{\\\\} required for escaping backslashes in R. When \code{FALSE}, regex is displayed as interpreted by the regex engine (i.e. double \code{\\\\} as a single \code{\\}).} \item{result_only}{Should only the result be displayed? If \code{FALSE}, then the colorized regular expression is also displayed in the output.} } \description{ View the result of the regular expression when applied to the given text. The default behavior renders the result as HTML and opens the file in the RStudio viewer pane. If \code{render} is \code{FALSE}, the HTML itself is returned. If the output is destined for a \link{knitr} document, set \code{knitr} to \code{TRUE}. } \examples{ view_regex("example", "amp", render=FALSE) }