new_regexp: Create a new regular expression to use in presser routes

Description Usage Arguments Details Value See Also Examples

View source: R/path.R

Description

Note that presser uses PERL regular expressions.

Usage

1

Arguments

x

String scalar containing a regular expression.

Details

As R does not have data type or class for regular expressions, you can use new_regexp() to mark a string as a regular expression, when adding routes.

Value

String with class presser_regexp.

See Also

The 'Path specification' and 'Path parameters' chapters of the manual of new_app().

Examples

1
new_regexp("^/api/match/(?<pattern>.*)$")

presser documentation built on July 1, 2020, 5:49 p.m.