% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/path.R
\name{new_regexp}
\alias{new_regexp}
\alias{webfakes_regexp}
\title{Create a new regular expression to use in webfakes routes}
\usage{
new_regexp(x)
}
\arguments{
\item{x}{String scalar containing a regular expression.}
}
\value{
String with class \code{webfakes_regexp}.
}
\description{
Note that webfakes uses PERL regular expressions.
}
\details{
As R does not have data type or class for regular expressions,
you can use \code{new_regexp()} to mark a string as a regular expression,
when adding routes.
}
\examples{
new_regexp("^/api/match/(?<pattern>.*)$")
}
\seealso{
The 'Path specification' and 'Path parameters' chapters
of the manual of \code{\link[=new_app]{new_app()}}.
}
