Don't forget to use perl = TRUE when using this with grepl() and friends.

ansi_regex()

Value

String scalar, the regular expression.

See also

Other low level ANSI functions: ansi_has_any(), ansi_hide_cursor(), ansi_strip()