% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addins.R, R/gadget.R
\name{regexplain_file}
\alias{regexplain_file}
\alias{regexplain_gadget}
\alias{regexplain_web}
\title{RegExplain gadget}
\usage{
regexplain_file(pattern = NULL, start_page = "RegEx")

regexplain_gadget(
  text = NULL,
  pattern = NULL,
  start_page = if (is.null(text)) "Text" else "RegEx"
)

regexplain_web(text = NULL, pattern = NULL, start_page = "Text", ...)
}
\arguments{
\item{pattern}{Regular Expression to edit or visualize using RegExplain}

\item{start_page}{Open gadget to this tab, one of \code{"Text"}, \code{"RegEx"},
\code{"Output"}, or \code{"Help"}}

\item{text}{Text to explore in gadget (editable using interface)}

\item{...}{
  Arguments passed on to \code{\link[shiny:shinyApp]{shiny::shinyApp}}
  \describe{
    \item{\code{ui}}{The UI definition of the app (for example, a call to
\code{fluidPage()} with nested controls)}
    \item{\code{server}}{A function with three parameters: \code{input}, \code{output}, and
\code{session}. The function is called once for each session ensuring that each
app is independent.}
    \item{\code{onStart}}{A function that will be called before the app is actually run.
This is only needed for \code{shinyAppObj}, since in the \code{shinyAppDir}
case, a \code{global.R} file can be used for this purpose.}
    \item{\code{options}}{Named options that should be passed to the \code{runApp} call
(these can be any of the following: "port", "launch.browser", "host", "quiet",
"display.mode" and "test.mode"). You can also specify \code{width} and
\code{height} parameters which provide a hint to the embedding environment
about the ideal height/width for the app.}
    \item{\code{uiPattern}}{A regular expression that will be applied to each \code{GET}
request to determine whether the \code{ui} should be used to handle the
request. Note that the entire request path must match the regular
expression in order for the match to be considered successful.}
    \item{\code{enableBookmarking}}{Can be one of \code{"url"}, \code{"server"}, or
\code{"disable"}. This is equivalent to calling the
\code{\link[shiny:enableBookmarking]{enableBookmarking()}} function just before calling
\code{shinyApp()}. With the default value (\code{NULL}), the app will
respect the setting from any previous calls to \code{enableBookmarking()}.
See \code{\link[shiny:enableBookmarking]{enableBookmarking()}} for more information.}
  }}
}
\description{
The function behind the RegExplain Selection and RegExplain File
addins. Opens the RegExplain gadget interface in an RStudio viewer
pane.
}
\section{Functions}{
\itemize{
\item \code{regexplain_file}: Opens file chooser to pick file, reads lines,
returns first \code{regexplain.addin.max_lines} (default 100). Used in the
"Regexplain File" \link{regexplain_addin}.

\item \code{regexplain_web}: Launches the RegExplain gadget in a browser or an
RStduio viewer pane.
}}

\examples{
\dontrun{
regexplain_gadget(text = month.name, pattern = "(Ma|Ju)|(er)")
regexplain_web(text = month.name, pattern = "(Ma|Ju)|(er)")
regexplain_file()
}

}
