regexplain (version 0.2.2)

wrap_regex: Wraps capture groups in regex pattern in span tags to colorize with CSS

Description

Wraps capture groups in regex pattern in span tags to colorize with CSS

Usage

wrap_regex(pattern, escape = TRUE, exact = TRUE)

Arguments

pattern

Regex pattern to look for

escape

Escape HTML-related characters in text?

exact

Should the regex pattern be displayed as entered by the user into R console or source (default)? When TRUE, regex is displayed with the double \\ required for escaping backslashes in R. When FALSE, regex is displayed as interpreted by the regex engine (i.e. double \\ as a single \).