regexplain (version 0.2.2)

wrap_result: Wrap matches in HTML span tags to colorize via CSS

Description

Wrap matches in HTML span tags to colorize via CSS

Usage

wrap_result(x, escape = FALSE, exact = FALSE)

Arguments

x

Individual list item in list returned by run_regex()

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 \).