Learn R Programming

stringstatic (version 0.1.2)

regex: Control regex matching behavior

Description

Dependency-free drop-in alternative for stringr::regex().

Usage

regex(
  pattern,
  ignore_case = FALSE,
  multiline = FALSE,
  comments = FALSE,
  dotall = FALSE
)

Value

An integer vector.

Arguments

pattern

Pattern to modify behavior.

ignore_case

Should case differences be ignored in the match?

multiline

If TRUE, $ and ^ match the beginning and end of each line. If FALSE, the default, only match the start and end of the input.

comments

If TRUE, white space and comments beginning with # are ignored. Escape literal spaces with \\.

dotall

If TRUE, . will also match line terminators.