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 Sept. 12, 2023, 5:06 p.m.