regex {stringstatic}R Documentation

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
)

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.

Value

An integer vector.

Source

Adapted from the stringr package.


[Package stringstatic version 0.1.2 Index]