re2r (version 0.2.0)

UNANCHORED: Anchors for pattern

Description

Anchors for regular expression pattern string.

Usage

UNANCHORED

ANCHOR_START

ANCHOR_BOTH

Arguments

Format

An object of class numeric of length 1.

Details

UNANCHORED - No anchoring

ANCHOR_START - Anchor at start only

ANCHOR_BOTH - Anchor at start and end

Examples

Run this code
# NOT RUN {
re2_match("This is an apple.", "(is)",anchor = ANCHOR_BOTH)
re2_match("This is an apple.", "(is)",anchor = UNANCHORED)
re2_match("This is an apple.", "(is)",anchor = ANCHOR_START)
re2_match("This is an apple.", "(This)",anchor = ANCHOR_START)
re2_match("This is an apple.", "(This)",anchor = ANCHOR_BOTH)
# }

Run the code above in your browser using DataLab