Learn R Programming

inTextSummaryTable (version 3.3.2)

getPatternPosition: 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)

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.

Arguments

x

String.

startPattern

String with start pattern.

endPattern

String with end pattern.

format

String with type of formatting

Author

Laure Cougnaud