getPatternPosition: Get position(s) (start, end) of a pattern in a string.

View source: R/flextable-convertSummaryStatisticsTableToFlextable.R

getPatternPositionR Documentation

Get position(s) (start, end) of a pattern in a string.

Description

Get position(s) (start, end) of a pattern in a string.

Usage

getPatternPosition(x, startPattern, endPattern = "\\}", format)

Arguments

x

String.

startPattern

String with start pattern.

endPattern

String with end pattern.

format

String with type of formatting

Value

Matrix with columns: 'start' and 'end' with start and end position(x) of the pattern, 'format' with the format and 'pattern' with the regex pattern for the full match. NULL if no match.

Author(s)

Laure Cougnaud


inTextSummaryTable documentation built on June 22, 2024, 9:24 a.m.